Name

ungetwc

Synopsis

Pushes a wide character back onto a file buffer to be read next

#include <stdio.h>
#include <wchar.h>
wint_tungetwc( wint_t wc, FILE *fp );

The ungetwc() function is the wide-character version of ungetc(), and works analogously, returning WEOF on failure or the wide character pushed back onto the file buffer if successful.

Example

See the example for the corresponding byte-character function, ungetc().

See Also

getwc(), getc()

Get C in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.