C语言中的数据类型转换函数

头文件#include<stdlib.h>

1. 函数名: atof  
 功 能: 把字符串转换成浮点数  
 用 法: double atof(const char *nptr); 
2.函数名: atol  
 功 能: 把字符串转换成长整型数 
 用 法: long atol(const char *nptr); 
3.函数名: atoi 
 功 能: 把字符串转换成整型数. 
 原型: int atoi(const char *nptr); 
 函数说明: 参数nptr字符串,如果第一个非空格字符不存在或者不是数字也不是正负号则返回零,否则开始做类型转换,之后检测到非数字(包括结束符 ) 字符时停止转换,返回整型数。

原文地址:https://www.cnblogs.com/SimonKly/p/6627165.html