Guardian C Library Calls Reference Manual
fgetc
3-42 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
fgetc
The fgetc function retrieves the next character from a file opened for ANSI I/O.
stream
denotes a file opened for ANSI I/O.
Return Value
is the character retrieved from the file. If fgetc encounters the end of the file or an
error, it returns the value EOF. To distinguish between these two cases, use the feof
or ferror function.
Example
This example returns the next character from the file $a.b.c:
#include <stdioh>
int c;
FILE *fp;
fp = fopen("$a.b.c", "r");
/* ... */
c = fgetc(fp);
#include <stdioh>
int fgetc(FILE *stream);