C program to convert string into lowercase using library function

C program to convert string into lowercase 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 string[20]= "BaronTuts";

   printf("Orignal String : %s", string);

   strlwr(string);
   printf("\nString after converting : %s", string);
}

OUTPUT:

Original String : BaronTuts
String after converting : 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.