Name

toupper

Synopsis

Converts a lowercase alphabetic character to uppercase

#include <ctype.h>
inttoupper( int c );

The toupper() function returns the uppercase letter corresponding to the character value of its argument c. If c is not an lowercase letter, or if there is no uppercase letter which corresponds to it, its value is returned unchanged.

Tip

The note concerning locales under tolower() in this chapter applies to toupper() as well.

Example

See the example for setlocale() in this chapter.

Get C in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.