
- The C Standard Library
- C Library - Home
- C Library - <assert.h>
- C Library - <ctype.h>
- C Library - <errno.h>
- C Library - <float.h>
- C Library - <limits.h>
- C Library - <locale.h>
- C Library - <math.h>
- C Library - <setjmp.h>
- C Library - <signal.h>
- C Library - <stdarg.h>
- C Library - <stddef.h>
- C Library - <stdio.h>
- C Library - <stdlib.h>
- C Library - <string.h>
- C Library - <time.h>
- C Standard Library Resources
- C Library - Quick Guide
- C Library - Useful Resources
- C Library - Discussion
- C Programming Resources
- C Programming - Tutorial
- C - Useful Resources
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C library function - toupper()
Description
The C library function int toupper(int c) converts lowercase letter to uppercase.
Declaration
Following is the declaration for toupper() function.
int toupper(int c);
Parameters
c − This is the letter to be converted to uppercase.
Return Value
This function returns uppercase equivalent to c, if such value exists, else c remains unchanged. The value is returned as an int value that can be implicitly casted to char.
Example
The following example shows the usage of toupper() function.
#include <stdio.h> #include <ctype.h> int main () { int i = 0; char c; char str[] = "Tutorials Point"; while(str[i]) { putchar (toupper(str[i])); i++; } return(0); }
Let us compile and run the above program to produce the following result −
TUTORIALS POINT
ctype_h.htm
Advertisements