C Program to Convert Uppercase String to Lowercase



In this program, we will take an upper case string as input from user and convert that into lowercase string



  1. //C program to convert string from upper case to lower case
  2. #include<stdio.h>
  3. #include<string.h>
  4. int main()
  5. {
  6. char str[50];
  7. int i;
  8. printf("Enter the string: ");
  9. scanf("%s",str);
  10. for(i=0;i<=strlen(str);i++){
  11. if(str[i]>=65&&str[i]<=90)
  12. str[i]=str[i]+32;
  13. }
  14. printf("\nLower Case is: %s",str);
  15. return 0;
  16. }

Output
Output!
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]


Join Our Facebook Group


Share this example


Download Android App

download android app

Popular C Examples









codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube