#include <stdlib.h>
int atoi(const char *nptr);
long atol(const char *nptr);
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void test01()
{
printf("%d\n", atoi("123")); //123
printf("%d\n", atoi("123abc"));//123
printf("%d\n", atoi("abc123"));//提取失败
printf("%f\n", atof("3.14"));//3.14
}
int main()
{
test01();
return 0;
}
标签:123,atol,printf,atoi,include,atof From: https://www.cnblogs.com/-glb/p/17575002.html