Essential Operators

1

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.
    }
A. 50
B. 60
C. 70
D. 90

2

Which operator is having the highest precedence in c++?

A. array subscript
B. Scope resolution operator
C. static_cast
D. dynamic_cast

3

What is the name of | operator?

A. sizeof
B. or
C. and
D. modulus

4

What is the associativity of add(+);

A. right to left
B. left to right
C. both of these
D. None of the mentioned

5

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.
    }
A. true
B. false
C. error
D. None of the mentioned