Professional Documents
Culture Documents
C Toupper - C Standard Library
C Toupper - C Standard Library
C Toupper - C Standard Library
C toupper()
The toupper() function converts a lowercase alphabet to
an uppercase alphabet.
toupper() Parameters
The function takes a single argument.
• ch - a character
1 of 2 9/9/2022, 10:18 PM
Firefox https://www.programiz.com/c-programming/library-function/ctype.h/to...
#include <stdio.h>
#include <ctype.h>
int main() {
char c;
c = 'm';
printf("%c -> %c", c, toupper(c));
c = 'D';
printf("\n%c -> %c", c, toupper(c));
c = '9';
printf("\n%c -> %c", c, toupper(c));
return 0;
}
Output
m -> M
D -> D
9 -> 9
2 of 2 9/9/2022, 10:18 PM