Namespaces
Variants
Views
Actions

ungetc

From cppreference.com
< c‎ | io
Revision as of 22:36, 31 May 2013 by P12bot (Talk | contribs)

 
 
File input/output


Functions
File access
Direct input/output
Unformatted input/output
(until C11)(since C11)
ungetc
(C95)(C95)
(C95)
(C95)(C95)
(C95)
(C95)
Formatted input
Formatted output
File positioning
Error handling
Operations on files
 
Defined in header <stdio.h>
int ungetc( int ch, FILE *stream );

Puts the character ch back to the given file stream.

Parameters

ch - character to be put back
stream - file stream to put the character back to

Return value

On success ch is returned.

On failure EOF is returned and the given stream remains unchanged.

See also

gets a character from a file stream
(function) [edit]