Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
1st Parameter
The character to be converted to uppercase. This is passed as an `int` to allow handling of `EOF` or extended character values.
Read more about parameters of toupper in parameters section
The toupperfunction in C language Converts a character to uppercase.
The toupper function converts a lowercase letter to the corresponding uppercase letter. If the argument is not a lowercase letter, it is returned unchanged. This function is commonly used for case conversion in text processing or to ensure consistent casing in certain applications.
The toupperfunction takes 1
parameter:
•
int `c`: The character to be converted to uppercase. This is passed as an `int` to allow handling of `EOF` or extended character values.
Converts the given character `c` to its uppercase equivalent if it is a lowercase letter. If `c` is not a lowercase letter, the function returns `c` unchanged. The behavior is undefined if `c` is not representable as an `unsigned char` and is not equal to `EOF`.
The toupper function return value :
If c is a lowercase letter, returns the corresponding uppercase letter
Otherwise, it returns c unchanged
Output
This example demonstrates toupper on both lowercase and uppercase letters.