CPP

CPP

Essential Operators has 7 Questions

What are the essential operators in c++?

+
|
<=
All of the mentioned
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     int main ()
  4.     {
  5.         int a, b, c;
  6.         a = 2;
  7.         b = 7;
  8.         c = (a > b) ? a : b;
  9.         cout << c;
  10.         return 0;
  11.     }

2
7
9
14
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     int main()
  4.     {
  5.         int a = 0;
  6.         int b = 10;
  7.         if ( a && b )
  8.         {
  9.             cout << "true"<< endl ;
  10.         }
  11.         else
  12.         {
  13.             cout << "false"<< endl ;
  14.         }
  15.         return 0;
  16.     }

true
false
error
None of the mentioned
What is the associativity of add(+);

right to left
left to right
both of these
None of the mentioned
What is the name of | operator?

sizeof
or
and
modulus
Which operator is having the highest precedence in c++?

array subscript
Scope resolution operator
static_cast
dynamic_cast
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     int main()
  4.     {
  5.         int a = 20;
  6.         int b = 10;
  7.         int c = 15;
  8.         int d = 5;
  9.         int e;
  10.         e = a + b * c / d;
  11.         cout << e << endl ;
  12.         return 0;
  13.     }

50
60
70
90