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;
}

  

猜你喜欢

转载自www.cnblogs.com/luckygxf/p/12405862.html