Change lowercase to uppercase in C++ 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 < iostream>
using namespace std;
int main()
{
char s;
cout<<"Enter Character in lower case"<< endl;
cin>>s;
cout<<"It's upper case is: "<< char(s-32);
return 0;
}


output-

Enter Character in lower case
r
It's upper case is: R




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!