In this program, you'll learn to convert a given string into lowercase letters.
#include<stdio.h>
#include<string.h>
int main()
{
int i;
char str[20];
printf("Enter the string..\n");
gets(str);
for(i=0; str[i]!= '\0'; i++)
{
if(str[i] >= 'A' && str[i] <='Z')
{
str[i] = str[i] + 32;
}
}
printf("\nString in LOWERCASE is..\n");
puts(str);
return 0;
}
Enter the string..
I am very to learn code!
String in LOWERCASE is..
i am very to learn code!