可以使用atoll或strtoll,将字符串转成long long类型。
#include <stdio.h>
#include <stdlib.h>
int main()
{
long long number = atoll("9223372036854775807");
printf("number=%lld\n", number);
long long number2 = strtoll("9223372036854775807", NULL, 10);
printf("number2=%lld\n", number2);
return 0;
}