toupper Function

  • If the character is a lowercase character (a to z), then it is converted to uppercase (A to Z) character.
  • It returns the uppercase equivalent of ch if ch is a letter or ch is returned unchanged.

  • Syntax :
    int toupper(int ch);



    Example

    
    #include <ctype.h>
    
    #include <stdio.h>
    
      void main() {
    
    	char b,ch='a';
    
    	b=toupper(ch);
    
    	printf("uppercase is: %c",b);
    
    }
    
    

    Output