C++ Data Types Part – 2

Master C++ with Real-time Projects and Kickstart Your Career Start Now!!

Program 1

#include<iostream>
using namespace std;
int main()
{
   bool a='A';
   system("cls");
   cout<<a;

//     char ch;  // variable
//     int a;
//     system("cls");
//    cout<<"Enter a character: ";
//    cin>>ch;
//   a=ch;
//   cout<<a;
   //cout<<int(ch);  //type casting

//    ch=ch+32;
//    cout<<ch;

    // string name;  //name
    // system("cls");
    // //ch='abcd';
    // name="abcd";
    // cout<<name.append("Vivek");
    // cout<<a
    // //cout<<sizeof(ch);
    return 0;
}

Did you know we work 24x7 to provide you best tutorials
Please encourage us - write a review on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *