Convert uppercase into lowercase letter by R4R Team

UPPERcase alphabet:

Example-
A,B,C,D,.........,X,Y,Z
All these alphabet is the upper case.
ASCII value for upper case alphabet:
A=65
B=66
C=67
.....
Y=89
Z=90

Lower-case alphabet:

Example-
a,b,c,d,...........,x,y,z
All these alphabet is of lower case.
ASCII value for lower case alphabet:
a=97
b=98
c=99
.....
y=121
Z=122

program-

#include < stdio.h>
int main()
{
char ch;
printf("Enter upper case alphabet\n");
scanf("%c",&ch);
printf("Its lower case is %c",ch+32);
return 0;
}


output-

Enter upper case alphabet
D
Its lower case is d

Enter upper case alphabet
V
Its lower case is v

-In this program, we take a input of the UPPER case alphabet and try to convert it into the lower case alphabet.
-We use ASCII value to do this.
-Difference between ASCII value of UPPER case and lower case alphabet is 32.
-So 'UPPER_CASE'+32=lower_case




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!