- long int strtol(const char *str, char **endptr, int base)
char *astr[] = { "+", "0", "123", "-12" };
char *ptr;
int res;
for (int i = 0; i < 4; i++) {
res = strtol(astr[i], &ptr, 10);
printf("%d ", res);
}
char *astr[] = { "+", "0", "123", "-12" };
char *ptr;
int res;
for (int i = 0; i < 4; i++) {
res = strtol(astr[i], &ptr, 10);
printf("%d ", res);
}