Learn C ProgrammingLearn ProgrammingPrograms On StringsResources

088. Write a program to convert givern string to lower case in C language

By September 18, 2012 September 5th, 2018 No Comments
#include<stdio.h>
#include<conio.h>  
main()
{
	int i;
	char *s1;
	clrscr();
	printf("Enter the string 1....");
	scanf("%s",s1);

	for(i=0;s1[i]!='\0';i++)
	{
		if((s1[i]>='A')&&(s1[i]<='Z'))
			s1[i]=s1[i]+32;
	}

	printf("Resultant string is...%s",s1);
	getch();
}


Leave a Reply

DEMO01