summaryrefslogtreecommitdiff
path: root/05/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-14 22:43:25 -0500
committerpommicket <pommicket@gmail.com>2022-02-14 22:43:25 -0500
commitf7c3154b8a0108ddeecdbd5afc3ac2c99124aab6 (patch)
treeaffb47d70d6edb2f75cca5d800baed954fb8d1e1 /05/main.c
parent0c5b34b8d082d980f0081ce818befdec46111b0b (diff)
strtoul, strtol
Diffstat (limited to '05/main.c')
-rw-r--r--05/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/05/main.c b/05/main.c
index ced784d..6b7aac7 100644
--- a/05/main.c
+++ b/05/main.c
@@ -1,7 +1,13 @@
+#define _STDLIB_DEBUG
#include <stdio.h>
#include <string.h>
int main(void) {
+ char s[] = " -0XAh.\n";
+ char *end;
+ errno = 0;
+ printf("%ld\n", strtol(s, &end, 0));
+ printf("%d:%s",errno,end);
return 0;
}