C++ Program for Char Data Types
Master C++ with Real-time Projects and Kickstart Your Career Start Now!!
Program 1
// Program for Character Data type
#include<iostream>
#define clrscr() system("cls")
using namespace std;
int main()
{
char ch;
// int x;
clrscr();
cout<<"\nEnter a character in upper case";
cin>>ch;
cout<<ch;
// ch=ch+32;
// cout<<"Lower Case is :"<<ch;
// x=ch;
// cout<<"\nCharacter value is : "<<ch;
// cout<<"\nAscii value is : "<<x;
return 0;
}
Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

