C strupr()

The strupr(string) function returns string characters in uppercase. Let's see a simple example of strupr() function.

snippet
#include
#include   
int main(){  
  char str[20];  
  printf("Enter string: ");  
  gets(str);//reads string from console  
  printf("String is: %s",str);  
  printf("\nUpper String is: %s",strupr(str));  
 return 0;  
}

Output:

Output
Enter string: rookienerd String is: rookienerd Upper String is: rookienerd
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +