一句话总结:
fgetchar = fgetc(stdin)
以下转载自:http://support.tenasys.com/INtimeHelp_5/fgetc.html
详细说明:
Fgetc reads a single character from the current position of the specified stream and increments the file pointer to the next character; fgetchar reads from stdin.
#include <stdio.h> int fgetc (FILE *stream); int fgetchar (void);
Parameters
- Pointer to FILE structure.
stream
Remarks
fgetchar is equivalent to:
fgetc (stdin)
Fgetc and fgetchar are identical to getc and getchar, but they are functions, not macros.
Return Values
-
The integer value of the character read.
- Success. EOF on error or end-of-file.
- Since EOF is a legal integer value, use feof or ferror to distinguish between an error and an end-of-file condition.
Requirements
| Versions | Defined in | Include | Link to |
|---|---|---|---|
| INtime 3.0 | intime/rt/include/stdio.h | stdio.h | clib.lib |
See Also
feof, ferror, fputc, fputchar, getc, getchar
本文介绍了fgetchar和fgetc两个函数的功能及用法。fgetchar等价于fgetc(stdin),用于从标准输入读取单个字符。这两个函数会返回所读取字符的整数值,在出错或到达文件末尾时返回EOF。文章还提供了函数的参数、返回值和使用注意事项。
1642

被折叠的 条评论
为什么被折叠?



