(1)atof 字符串→双精度浮点型
double atof (const char* str);
(2)atoi 字符串→整型
int atoi (const char * str);
(3)atol 字符串→整型 注意:long、int、long int 这三个都是4个字节的,也就是最大21 4748 3647。
long int atol ( const char * str );
(4)atoll 字符串→长整型 注意:long long占8位
long long int atoll ( const char * str );
(5)bsearch 二分查找 返回找到的元素,无法返回下标。参数1:查找值。参数2:被查找的地址。参数3:地址中有几个元素。参数4:每个元素占几字节。参数5:比对函数。
void* bsearch (const void* key, const void* base, size_t num, size_t size, int (*compar)(const void*, const void*));
原文:http://www.cnblogs.com/xcw0754/p/4434286.html