函数名: atof
    功 能: 把字符串转换成浮点数
    用 法: double atof(const char *nptr);
    程序例:
    #include
    #include

    int main(void)
    {
    float f;
    char *str = “12345.67”;

    f = atof(str);
    printf(“string = %s float = %f/n”, str, f);
    return 0;
    }