scanf的返回值
来源:互联网 发布:希尔伯特矩阵 正定 编辑:程序博客网 时间:2024/05/16 15:33
关于scanf的返回值,MSDN里是这样写的:
Both scanf and wscanf return the number of fields successfully converted
and assigned; the return value does not include fields that were read but
not assigned. A return value of 0 indicates that no fields were assigned.
The return value is EOF for an error or if the end-of-file character or the
end-of-string character is nocountered in the first attempt to read a character.
如:
scanf("%d%d", &a, &b);
如果a和b都被成功读入,那么scanf的返回值就是2
如果只有a被成功读入,返回值为1
如果a和b都未被成功读入,返回值为0
如果遇到错误或遇到end of file,返回值为EOF。
- scanf的返回值
- scanf的返回值
- scanf的返回值
- scanf的返回值
- scanf()的的返回值
- 关于scanf的返回值
- 关于scanf的返回值
- 关于scanf的返回值
- 关于scanf的返回值
- scanf的返回值探究
- scanf( )函数的返回值
- Scanf函数的返回值
- scanf函数的返回值
- scanf() 的返回值
- scanf函数的返回值
- 关于检查scanf的返回值
- scanf和cin的返回值
- scanf,printf函数的返回值
- Java实现几种常见排序方法
- 买不起书的来下电子书吧,我搜集的,超全
- 访问XML Document Best Pratice
- php优化方法
- Weblogic集群概念和配置(一)
- scanf的返回值
- VC常用数据类型使用转换
- Weblogic集群概念和配置(二)
- Weblogic集群概念和配置(三)
- 百度“凤巢”一次事关生死的广告计划
- 操作系统的环境变量的解释
- ftp commands
- Weblogic集群概念和配置(四)
- Makefile目标重载