atoi, _atoi_l, _wtoi, _wtoi_l
来源:互联网 发布:人民邮电 算法谜题 编辑:程序博客网 时间:2024/04/28 21:25
#include <stdlib.h>#include <stdio.h>#include <errno.h>int main( void ){ char *str = NULL; int value = 0; // An example of the atoi function. str = " -2309 "; value = atoi( str ); printf( "Function: atoi( \"%s\" ) = %d\n", str, value ); // Another example of the atoi function. str = "31412764"; value = atoi( str ); printf( "Function: atoi( \"%s\" ) = %d\n", str, value ); // Another example of the atoi function // with an overflow condition occuring. str = "3336402735171707160320"; value = atoi( str ); printf( "Function: atoi( \"%s\" ) = %d\n", str, value ); if (errno == ERANGE) { printf("Overflow condition occurred.\n"); }}
Function: atoi( " -2309 " ) = -2309Function: atoi( "31412764" ) = 31412764Function: atoi( "3336402735171707160320" ) = 2147483647Overflow condition occurred.
- atoi, _atoi_l, _wtoi, _wtoi_l
- atoi, _atoi_l, _wtoi, _wtoi_l
- atoi
- atoi
- atoi
- atoi()
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- atoi
- oracle归档日志超出了恢复闪回恢复区(flash_recovery_area)限制的解决方法
- 自己写代码生成器之生成Dal层代码(获取数据库所有表名称)
- python python-eggs 异常解决方法
- 成功人士永不会做的一件事
- 调用堆栈恢复实操
- atoi, _atoi_l, _wtoi, _wtoi_l
- 迪杰斯特拉算法秒杀单源最短路径!!!
- httpclient双向认证
- 关于工作中遇到的诡异之事
- 如何使数据库中大的浮点数正常显示,不变成科学计数法显示
- C++中的单例模式
- 利用stl求夹角
- HTML5 拖拽上传多个文件文件
- Android学习之——intent-fliter配置之data属性