c语言中atof 和atoi是什么意思?
c语言中atof 和atoi是什么意思?
日期:2017-10-04 15:22:42 人气:1
这两个都是C语言的库函数
函数名: atoi 功 能: 把字符串转换成长整型数 用 法: #include int atoi(const char *nptr); 程序例: #include #include int main(void) { int n; char *str = "1234"; n = atoi(str); printf("string = %s integer = %d\n", str, n); return 0; } 运行结果是: