Read more about parameters of getwchar in parameters section
The getwcharfunction in C language Reads the next wide character from the standard input stream.
The getwchar function obtains the next wide character (if present) as a wchar_t converted to a wint_t, from the input stream pointed to by stdin, and advances the associated file position indicator for stdin (if defined). It is equivalent to getwc(stdin).
The getwcharfunction takes 1
parameter:
•
void ``: Indicates that the function takes no arguments
Reads the next wide character from the standard input (`stdin`) and returns it as a `wint_t`. Returns `WEOF` if the end-of-file is reached or an error occurs.
The getwchar function return value :
Returns the wide character read as a wint_t, or WEOF on end-of-file or error
Output
This example demonstrates basic usage of getwchar to read a single wide character from standard input.