You are here : Cctype.htoupper

toupper() - ctype.h

The C library function int toupper(int c) converts lowercase letter to uppercase.
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.


Syntax

int toupper(int c);


Example

#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);
}


Output / Return Value

TUTORIALS POINT


Limitations


Alternatives / See Also


Reference