2.12.5.1 fgetc

Declaration:

int fgetc(FILE *stream);

Gets the next character (an unsigned char) from the specified stream and advances the position indicator for the stream.

On success the character is returned. If the end-of-file is encountered, then EOF is returned and the end-of-file indicator is set. If an error occurs then the error indicator for the stream is set and EOF is returned.