#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main () {
int val;
char str[20];
strcpy(str, "98993489");
val = atoi(str);
printf("String value = %s, Int value = %d/n", str, val);
strcpy(str, "yiibai.com");
val = atoi(str);
printf("String value = %s, Int value = %d/n", str, val);
return(0);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265240.html