一句话总结:
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