Table of Contents
Previous topic Next topic
C LIBRARY FUNCTIONS->Detailed Descriptions->ungetc()
Summary
#include <stdio.h>
int ungetc(int c,FILE* stream); | Push back character onto stream |
Parameter
c | Character to push pack |
stream | Pointer to FILE structure |
Description
This function converts the character c to unsigned char and pushes it back onto the given input stream specified. The next input from stream then reads this character. Only one character of pushback is supported. EOF cannot be pushed back. The function returns the character pushed back or EOF is an error has occurred. stdin is the only input stream supported.
Return Value
The function returns the character pushed back or EOF if an error occurs.