Everything

ungetc


Push character back to input stream

Remark

These functions are not supported by the debugging functions which CS+ provides.

[Classification]

Standard library

[Syntax]

#include <stdio.h>

int ungetc(int c, FILE *stream);

[Return value]

The character c is returned.

Error return does not occur.

[Description]

This function pushes the character c back into the input stream pointed to by stream. However, if c is EOF, no pushback is performed. The character c that was pushed back will be input as the first character during the next character input. Only one character can be pushed back by ungetc. If ungetc is executed continuously, only the last ungetc will have an effect. Only the standard input/output stdin can be specified for stream.