Inputs one character from a stream input/output file.
When a read error occurs, the error indicator for that file is set.
The fgetc function inputs one character from the stream input/output file indicated by file pointer fp.
The fgetc function normally returns the input character, but returns EOF at end-of-file or when an error occurs. At end-of-file, the end-of-file indicator for that file is set.