Ungetc put character back on input #include <stdio.h> ungetc char ch FILE *fp Description This function alters the state of the input file buffer such that the next call of "getc()" returns "ch". Only one character may be pushed back, and at least on character must have been read from the file before a call to ungetc. Fseek() erases any puchback. Diagnostics Ungetc returns its character argument unless no puchback could occur, in which case EOF is returned. See Also getc(), fseek()