Home > Electronics Tutorials > C Language Tutorial > stdio.h - Character I/O Functions - ungetc

C Language Programming Library Reference Guide

stdio.h - Character I/O Functions - ungetc

Declaration: int ungetc(int char, FILE *stream); Pushes the character char (an unsigned char) onto the specified stream so that the this is the next character read. The functions fseek, fsetpos, and rewind discard any characters pushed onto the stream.

Multiple characters pushed onto the stream are read in a FIFO manner (first in, first out).

On success the character pushed is returned. On error EOF is returned.

Note: To report broken links or to submit your projects, tutorials please email to Webmaster

Discover

     more......