Menu
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

C ctype toupper() Function

❮ C ctype Library


Example

Convert a character to uppercase:

char l = 'a';
char u = toupper(l);
printf("%c in uppercase is %c", l, u);
Try it Yourself »

Definition and Usage

The toupper() function returns the ASCII value of an uppercase version of the character. If the character is not an uppercase character then its value is returned without being changed.

The toupper() function is defined in the <ctype.h> header file.


Syntax

int toupper(int c);

Parameter Values

Parameter Description
c Required. The ASCII value of a character or an actual character

Technical Details

Returns: An int value representing the ASCII value of the uppercase version of a character.

❮ C ctype Library