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

  

posted on 2020-03-04 00:29  luckygxf  阅读(162)  评论(0编辑  收藏  举报

导航