Learning C
C Function References
C Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
C - toupper function
Synopsis:
#include <stdio.h>
int toupper(int c);
|
Description:
The function returns the corresponding uppercase letter if one exists and if islower(c); otherwise, it returns c.
Return Value
The function returns the corresponding uppercase letter if one exists and if islower(c); otherwise, it returns c.
Example
#include <stdio.h>
int main() {
printf( "Upper case of A is %c\n", toupper('A'));
printf( "Upper case of 9 is %c\n", toupper('9'));
printf( UpperLower case of g is %c\n", toupper('g'));
return 0;
}
|
It will proiduce following result:
Lower case of A is A
Lower case of 9 is 9
Lower case of g is G
|
|
|
|
|