strtoul, strtol
This commit is contained in:
parent
0c5b34b8d0
commit
f7c3154b8a
3 changed files with 129 additions and 2 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue