Operators in C++

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

Program 1

#include<iostream>
using namespace std;
int main()
{
    system("cls");
     //cout<<(5<<3); //40
//     cout<<(23>>2);
      cout<<(-1>>10);
//   cout<<((5&5|5)^5);


    // cout<< (5 & 5);       //5
    // cout<<endl<<(5 | 5);  //5
    // cout<<endl<<(5 ^ 5);  //0

    //   cout<< (5 & 5);  //5
    //   cout<<endl<<(5 && 5);  //1


      //int a=0,b=10,c;
//       !(a&&a)?cout<<"Hello":cout<<"Bye";  
        // c=!120;  //  !5
        // cout<<c;
    //   c=(++a > 2 || ++b>5);
    //   cout<<"a="<<a<<"  b="<<b<<"  c="<<c; 
    //  int a;
    //  a=++5;
    //  cout<<a;
    //   int a=5;
    //   cout<<++a;  // 6
    //   cout<<endl<<a++; //6 
    //   cout<<endl<<++a; //8

      //cout<<(++a>10);

    // int a=5,b;
    // b=++a + a++ + ++a; 
    // cout<<"a="<<a<<"  b="<<b; 
    return 0;
} 
    
    
    
    
    
    
    
    
    
    
    
    //float a;
  //  system("cls");
   // a=15/2.0;
    // cout<<a;
    // int a=1,b=1,c=1;
    // system("cls");

    // cout<<(a==b==c); 
    // system("cls");
    // int a=150,b=140,c=90;
    //  cout<<(a>b>c); 

We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

courses
Image

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 *