atof 函数的具体用法?

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/17 20:02:38
atof 函数的具体用法?
xJ@_e"l۬Ml.D_" " U"j10v7-ܤ^^X؋93Gkh={|yħkZj^?AtÏZ-R᧙Mp*~V w#DquE-CtʨQ\^~h"J&0pE!a@J>H+$*HVJnP()^tϠ(L̊4xx0q!rPaTC"n)uX]8hs K˚ځ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;
  }