Everything

getc


Inputs one character from a stream input/output file.

[Format]

#include <stdio.h>

long getc (FILE *fp);

[Parameters]

fp File pointer

[Return values]

Normal: End-of-file: EOF

Otherwise: Input character

Abnormal: EOF

[Remarks]

When a read error occurs, the error indicator for that file is set.

The getc function inputs one character from the stream input/output file indicated by file pointer fp.

The getc 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.