Parameters of toupper() in C++

It accepts a single parameter:

  • ch: It is the character to be converted to uppercase.

toupper() in C++

In C++, the toupper() function converts a lowercase alphabet to an uppercase alphabet. It is a library function defined inside the ctype.h header file. If the character passed is a lowercase alphabet, then the toupper() function converts it to an uppercase alphabet. This function does not affect an uppercase character, special symbol, digits, or other ASCII characters.

Similar Reads

Syntax of toupper() in C++

toupper(int ch);...

Parameters of toupper() in C++

It accepts a single parameter:...

Return Value of toupper() in C++

This function returns the ASCII value of the uppercase character corresponding to the ch. It is automatically converted to the character if assigned to the character variable. We can also manually typecast it to char using the below syntax:...

Examples of toupper() in C++

The following examples illustrates how we can use toupper() in various scenarios....