diff options
author | pommicket <pommicket@gmail.com> | 2022-02-14 22:43:25 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-14 22:43:25 -0500 |
commit | f7c3154b8a0108ddeecdbd5afc3ac2c99124aab6 (patch) | |
tree | affb47d70d6edb2f75cca5d800baed954fb8d1e1 /05/main.c | |
parent | 0c5b34b8d082d980f0081ce818befdec46111b0b (diff) |
strtoul, strtol
Diffstat (limited to '05/main.c')
-rw-r--r-- | 05/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; } |