- 14
- 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.
您可能关注的文档
- 医疗机构营业执照翻译.docx
- 白鹤滩环评报告.pdf
- 通讯业常用英语单词汇总.docx
- PP常用事务代码.docx
- 英语合同的语言特点.doc
- 英文合同翻译用词——herein.docx
- 工程招投标英语词汇汇总(完整版).doc
- 工商管理英语课后习题答案汇总.docx
- 管理学国内知名教授.doc
- 商务英语4课文翻译Customers first.doc
- 湖北《钢结构装配式住宅技术规程》.docx
- 2026-2027学年第一学期八年级上册数学月考9月学情监测卷含答案(华师).pdf
- 万利达(Malata) 618 广场舞音响售后维修服务手册.pdf
- 指北者 TK10 乐器音箱售后维修服务手册.pdf
- 音乐骑士 T3 G10s 音响售后维修服务手册.pdf
- 先锋(Pioneer) MK808 音箱售后维修服务手册.pdf
- 山水(SANSUI) PU215 广场舞音响售后维修服务手册.pdf
- 安桥(ONKYO) TX8470 功放售后维修服务手册.pdf
- 2026-2027学年第一学期八年级上册数学月考9月学情监测卷含答案(人教).pdf
- 意力(ELAC) DCB61 音箱售后维修服务手册.pdf
原创力文档

文档评论(0)