toupper

Converts a lowercase character to the corresponding uppercase character

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Character Manipulation

Syntax

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

Parameters

c
(IN) Specifies the character to be converted to uppercase.

Return Values

The toupper function returns the corresponding uppercase character when the argument is a lowercase letter. Otherwise, the original character is returned.

Remarks

The toupper function converts a lowercase character to the corresponding uppercase character in the ASCII code set.

See Also

isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, strlwr, strupr, tolower

Example

  #include <stdlib.h>  
  #include <ctype.h>  
  #include <stdio.h>  
   
  main()  
  {  
     char s[] = "third quarter report";  
     int i;  
     for(i=0;s[i];i++) s[i] = toupper(s[i]);  
     printf("%s\r\n",s);  
     getch();  
  }