c atoi demo
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> int main() { char *ns = "124142"; char *ns1 = "324241324"; printf("%d\n", atoi(ns)); printf("%ld\n", atol(ns1)); return 0; }
Please call me JiangYouDang!