atof 函数的具体用法?
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/17 20:02:38
![atof 函数的具体用法?](/uploads/image/z/14260301-53-1.jpg?t=atof+%E5%87%BD%E6%95%B0%E7%9A%84%E5%85%B7%E4%BD%93%E7%94%A8%E6%B3%95%3F)
xJ@_e"l۬Ml.D_"
"
U"j10v7-ܤ^^X؋93Gkh={|yħkZj^?AtÏZ-R᧙Mp*~Vw#DquE-CtʨQ\^~h"J&0pE!a@J>H+$*HVJnP()^tϠ(L̊4xx0q!rPaTC"n)uX]8hsK˚ځX=*b]zrL$%^#Z+EmP3mH>od
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;
}