Home > Electronics Tutorials > C Language Tutorial > stdio.h - Character I/O Functions - fgetc

C Language Programming Library Reference Guide

stdio.h - Character I/O Functions - 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.

Note: To report broken links or to submit your projects, tutorials please email to Webmaster