C program to convert uppercase to lowercase string using Loop.












C program to convert uppercase to lowercase string using Loop.




C program to convert uppercase to lowercase string using Loop.



#include <stdio.h> #define MAX 100 int main() { char text[MAX]; int i; printf("\n Enter any string: "); gets(text); for(i=0; text[i]!='\0'; i++) { if(text[i]>='A' && text[i]<='Z') { text[i] = text[i] + 32; } } printf("\n To convert Upper case to Lower case string: %s", text); return 0; }


Output:
Enter any string: LANGUAGE To convert Upper case to Lower case string: language




Exercise: 1
C program to convert string to lowercase.