#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
int main() {
char s[30] = "948479843849854564654";
char *endPtr;
long long ll = strtoll(s, &endPtr, 10);
if (errno == ERANGE) {
printf("The number is too big for long long");
return 1;
}
printf("%lld", ll);
return 0;
}
/*
run:
The number is too big for long long
*/