MicrOS
ungetc.c File Reference
#include "../stdio.h"

Functions

int ungetc (int character, FILE *stream)
 Unget character from stream. More...
 

Function Documentation

◆ ungetc()

int ungetc ( int  character,
FILE stream 
)

Unget character from stream.

A character is virtually put back into an input stream, decreasing its internal file position as if a previous getc operation was undone.

Parameters
characterThe int promotion of the character to be written.
streamPointer to a FILE object that identifies the stream to be closed.
Returns
On success, the character put back is returned. If the operation fails, EOF is returned.