HP C/iX Library Reference Manual (30026-90004)

Chapter 5 149
HP C/iX Library Function Descriptions
fgetc
fgetc
Reads a character from an open stream.
Syntax
#include <stdio.h>
int fgetc (FILE *
stream
);
Parameters
stream
Pointer to an open stream.
Return Values
x The character read, expressed as an integer.
EOF No more input, or an error occurred.
Description
The fgetc function reads the next character from the specified stream and advances the
file position. The character is returned as an integer. When there are no more input
characters, the value EOF is returned.
See Also
fclose(), ferror(), fopen(), fread(), getc(), gets(), putc(), fputc(), scanf(),
ANSI C 4.9.7.1, POSIX.1 8.1