Tuesday, 2 April 2013

Convert the string into lowercase


By on 00:46

Convert the string into lowercase:-

Q)Write a program to enter string and convert string(Character Array) into lowercase.

Note:-You can also create this program in c++(c plus plus),java,perl,c#(c sharp) languages etc. with the same logic.

P:void main()
{
char string[40];
int i;
printf("Enter String");
gets(string);
for(i=0;string[i]!='\o';i++)
{
if(string[i]>65 && string[i]<=90)
string[i]=string[i]+32;
}
puts(string);
getch();
}

If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...