C program to convert uppercase to a lowercase string using ASCII values
kw.c
#include<stdio.h>
#include<string.h>intmain(){chars[20];inti;printf("———————————————————————————————————————————");printf("\nProgram to convert upper to a lowercase string");printf("\n———————————————————————————————————————————");printf("\nEnter the string ");scanf("%s",s);for(i=0;i<=strlen(s);i++){if(s[i]>=65&&s[i]<=92)s[i]=s[i]+32;}printf("\nThe lowercase string is %s",s);printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to convert upper to a lowercase string
———————————————————————————————————————————
Enter the string WELCOME
The lowercase string is welcome
———————————————————————————————————————————
kodingwindow@kw:~$
C program to convert uppercase to a lowercase string using tolower() function
kw.c
#include<stdio.h>intmain(){chars[20];inti;printf("———————————————————————————————————————————");printf("\nProgram to convert upper to a lowercase string");printf("\n———————————————————————————————————————————");printf("\nEnter the string ");scanf("%s",s);for(i=0;s[i];i++)s[i]=tolower(s[i]);printf("\nThe lowercase string is %s",s);printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to convert upper to a lowercase string
———————————————————————————————————————————
Enter the string WELCOME
The lowercase string is welcome
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the KodingWindow Android app. We intend to soon make it available on the Google Play Store. Currently, you need to install apk manually. Would you like to get the app? Minimum Requirement(s): Android 10