In this program, we are going to share a C program to convert Uppercase to Lowercase. If you are a beginner and want to start learning the C programming, then keep your close attention in this tutorial as I am going to share a C program to convert Uppercase to Lowercase with the output.
We have designed this program for beginners for learning purpose. Copy below c program and execute it with c compiler to see the output of the program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #include<stdio.h> #include<conio.h> #include<string.h> void main() { clrscr(); char str[20]; int i; printf("Enter the String (Enter First Name) in uppercase : "); scanf("%s",str); for(i=0;i<=strlen(str);i++) { if(str[i]>=65 && str[i]<=92) { str[i]=str[i]+32; } } printf("\nThe String in Lowercase = %s",str); getch(); } |
Enter ‘x’ for exit.
Enter any string in uppercase to convert in lowercase: FREEWEBMENTOR
Same String in Lowercase = freewebmentor
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.