An integer type capable of storing any wide character value or the special value WEOF, used in wide-character input/output functions.
1st Parameter
The wide character to be converted to uppercase. Must be a valid `wint_t` value or `WEOF`.
Read more about parameters of towupper in parameters section
The towupperfunction in C language Converts a wide character to uppercase.
The towupper function converts a lowercase wide character to the corresponding uppercase wide character. If the argument is not a lowercase letter, it is returned unchanged. This function is the wide-character counterpart of toupper and is used for case conversion in wide character text processing.
The towupperfunction takes 1
parameter:
•
wint_t `wc`: The wide character to be converted to uppercase. Must be a valid `wint_t` value or `WEOF`.
Converts the given wide character `wc` to its uppercase equivalent if it is a lowercase letter. If `wc` is not a lowercase letter, the function returns `wc` unchanged. If `wc` is `WEOF`, the function returns `WEOF`.
The towupper function return value :
If wc is a lowercase letter, returns the corresponding uppercase letter
Otherwise, it returns wc unchanged
Output
This example demonstrates towupper on both lowercase and uppercase wide characters.