VMS Help
CRTL, ungetc
*Conan The Librarian
|
Pushes a character back into the input stream and leaves the
stream positioned before the character.
Format
#include <stdio.h>
int ungetc (int character, FILE *file_ptr);
character
A value of type int.
file_ptr
A file pointer.
When using the ungetc function, the character is pushed back onto
the file indicated by file_ptr.
One push-back is guaranteed, even if there has been no previous
activity on the file. The fseek function erases all memory of
pushed-back characters. The pushed-back character is not written
to the underlying file. If the character to be pushed back is
EOF, the operation fails, the input stream is left unchanged, and
EOF is returned.
See also fseek and getc.
x The push-back character.
EOF Indicates it cannot push the character back.