The btowc() is a built-in function in C/C++ which converts a character to its wide character equivalent. It is defined within the cwchar header file of C++.
wint_t btowc( int ch );
Parameter:The function accepts a single mandatory parameter ch which specifies to the single byte character to convert to it’s wide character.
The function returns the wide character representation of ch if ch is a valid single byte character. If ch is EOF, WEOF is returned.
Below programs illustrates the above function.
14 out of 15 Characters were successfully widened
12 out of 13 Characters were successfully widened
- conj() function in C++ with Examples
- quick_exit() function in C++ with Examples
- wcslen() function in C++ with Examples
- wcscpy() function in C++ with Examples
- wcsspn() function in C/C++ with Examples
- wcscmp() function in C++ with Examples
- norm() function in C++ with Examples
- getdate() and setdate() function in C with Examples
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- arc function in C
- exp() function C++
- div() function in C++
- log() function in C++
- fma() function in C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.