Search Your Topic

Thursday, 22 June 2017 03:19

C String Uppercase: strupr()

Written by
Rate this item
(0 votes)

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

  1. #include<stdio.h>  
  2. #include<conio.h>  
  3. void main(){  
  4.   char str[20];  
  5.   clrscr();  
  6.   printf("Enter string: ");  
  7.   gets(str);//reads string from console  
  8.   printf("String is: %s",str);  
  9.   printf("\nUpper String is: %s",strupr(str));  
  10.   getch();  
  11. }    


Enter string: toshiyasit
String is: toshiyasit
Upper String is: TOSHIYASIT
Read 78 times
Anish Sir

"I am delighted once again to pen the welcome note to the Tosh!Yas Technologies ."

 Call +91 74 88 34 7779  | Email :
More in this category: « C String Lowercase: strlwr()

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.