ungetc - push character back onto input stream
#include <stdio.h>
ungetc() inserts the character specified by c (converted to an unsigned char) into the buffer associated with an input stream. That character, c, will be returned by the next getc() call on that stream. ungetc() returns c, and leaves the file corresponding to stream unchanged. A successful call to ungetc() clears the EOF indicator for stream .
Four bytes of pushback are guaranteed.
The value of the file position indicator for stream after reading or discarding all pushed-back characters will be the same as it was before the characters were pushed back.
If c equals EOF, ungetc() does nothing to the buffer and returns EOF.
fseek(), rewind(), erase the memory of inserted characters for the stream on which they are applied.
ungetc() returns EOF if it cannot insert the character.
No errors are defined.