int ungetc(int c, FILE *stream);
The ungetc() function
pushes the character specified by integer c,
cast to an unsigned char, back onto the input
stream pointed to by stream. The end-of-file indicator for
stream is cleared, and subsequent reads will get any
pushed-back bytes in the reverse order that they were pushed. No
actual writes, however, are performed to the file or other
underlying storage of stream.
A successful call to a file-positioning
function for stream, such as fsetpos()
or rewind(), discards any pushed back bytes for the stream.
The pushback buffer is limited.
Repeated calls to ungetc() with no intervening read or
file positioning operations fail.
Is the character to push back onto stream.
Points to the input stream.
If successful, the ungetc()
function returns the character pushed back after conversion. On
failure, ungetc() returns an EOF.
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- fputc(), fsetpos(), rewind()
PTC MKS Toolkit 10.3 Documentation Build 39.