vprintf, vfprintf, vsprintf, and vsnprintf


#include <stdio.h>int ungetc(int ch, FILE *stream);

The ungetc( ) function returns the character specified by the low-order byte of ch to the input stream stream. This character will then be obtained by the next read operation on stream. A call to fflush( ), fseek( ), or rewind( ) undoes an ungetc( ) operation and discards the character.

A one-character pushback is guaranteed; however, some implementations will accept more.

You may not unget an EOF.

A call to ungetc( ) clears the end-of-file flag associated with the specified stream. The value of the file position indicator for a text stream is undefined until all pushed-back characters are read, in which case it will be the same as it was prior to the first ungetc( ) call. For binary streams, each ungetc( ) call decrements the file position indicator.

The return value is equal to ch on success and EOF on failure.

A related function is getc( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net