C Program to Convert String in Uppercase Using Library Function

C Program to Convert String in Uppercase Using Library Function:
If you are using any software then below program will not give an error, but if you are using TURBO C then you have to make some changes like: void main() and some function like clrscr() or getch().

#include<stdio.h>
#include<string.h>

main()
{
   char str[]="BaronTuts";

   printf("String before converting: %s\n",str);
   strupr(str);
   printf("\nString after converting in uppercase : %s",str);
}

OUTPUT:

String before converting: BaronTuts
String after converting in uppercase : BARONTUTS

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.