- 13
- 0
- 约6.3千字
- 约 7页
- 2017-05-27 发布于河南
- 举报
C类型转换atoiatolatofstdlib.h,itoaftoachar---string
1. atoi
int atoi ( const char * str );
Convert string to integer
Parses the C string str interpreting its content as an integral number, which is returned as an int value.
/* atoi example */
#include stdio.h
#include stdlib.h
int main ()
{
int i;
char szInput [256];
printf (Enter a number: );
fgets ( szInput, 256, stdin );
i = atoi (szInput);
printf (The value entered is %d. The double is %d.\n,i,i*2);
return 0;
}
output
Enter a number: 73
The value entered is 73. The double is 146.
您可能关注的文档
最近下载
- 22G101钢筋三维图集详解.pptx
- 20100915老爷庙煤矿项目成本分析.doc VIP
- 22g101-3基础顶板受力筋计算.pdf VIP
- 13《董存瑞舍身炸暗堡》课件(共41张PPT).pptx VIP
- 22G101系列结构图集解读.pptx
- 毕业设计(论文)--壳体零件的加工工艺及夹具设计.doc VIP
- 22G101平法识图与钢筋计算3.pptx VIP
- 12广西2025年高等职业教育考试全区模拟测试 食品药品与粮食 大类试题及逐题答案解说.pdf VIP
- 22G101-1与16G101-1图集新增变化.pptx VIP
- GE iFIX:iFIX报表系统设计与实现.Tex.header.docx VIP
原创力文档

文档评论(0)