atof 函数的具体用法?
来源:学生作业帮助网 编辑:六六作业网 时间:2025/02/02 23:42:54
atof函数的具体用法?atof函数的具体用法?atof函数的具体用法?欢迎采纳函数名:atof 功能:把字符串转换成浮点数 名字来源:arraytofloatingpointnumbers的缩写
atof 函数的具体用法?
atof 函数的具体用法?
atof 函数的具体用法?
欢迎采纳
函数名: atof
功 能: 把字符串转换成浮点数
名字来源:array to floating point numbers 的缩写
用 法: double atof(const char *nptr);
程序例:
#include
#include
int main()
{
float f;
char *str = "12345.67";
f = atof(str);
printf("string = %s float = %f\n", str, f);
return 0;
}