168. C Program to Convert Uppercase Text into Lowercase Text.
How does this program work?
- This Program is used to convert uppercase text into lowercase text.
Here is the code
#include <string.h>
int main()
{
char s[50];
int i;
printf("Enter a string in Uppercase : \n");
gets(s);
for(i = 0; s[i]!='\0'; i++)
{
if(s[i] >= 'A' && s[i] <= 'Z')
{
s[i] = s[i] + 32;
}
}
printf("String in Lower Case = %s\n", s);
return 0;
}