Operators

1

What is the output of this program?

1.
    #include 
2.    
    using namespace std;
3.    
    main()
4.    
    {
5.    
        double a = 21.09399;
6.        
        float b = 10.20;
7.        
        int c ,d;
8.        
        c = (int) a;
9.        
        d = (int) b;
10.        
        cout << c <<' '<< d;
11.        
        return 0;
12.        
    }
A. 20 10
B. 10 21
C. 21 10
D. none of the mentioned

2

What is the output of this program?

1.
    #include 
2.    
    using namespace std;
3.    
    int main()
4.    
    {
5.    
        int a = 5, b = 6, c;
6.        
        c = (a > b) ? a : b;
7.        
        cout << c;
8.        
        return 0;
9.        
    }
A. 6
B. 5
C. 4
D. 7

3

What is the output of this program?

1.
    #include 
2.    
    using namespace std;
3.    
    int main ()
4.    
    {
5.    
        int x, y;
6.        
        x = 5;
7.        
        y = ++x * ++x;
8.        
        cout << x << y;
9.        
        x = 5;
10.        
        y = x++ * ++x;
11.        
        cout << x << y;
12.        
        return 0;
13.        
    }
A. 749736
B. 736749
C. 367497
D. none of the mentioned

4

What is the output of this program?

1.
    #include 
2.    
    using namespace std;
3.    
    int main()
4.    
    {
5.    
        int i, j;
6.        
        j = 10;
7.        
        i = (j++, j + 100, 999 + j);
8.        
        cout << i;
9.        
        return 0;
10.        
    }
A. 1000
B. 11
C. 1010
D. 1001

5

What is the output of this program?

1.
    #include 
2.    
    using namespace std;
3.    
    int main()
4.    
    {
5.    
        int a = 5, b = 6, c, d;
6.        
        c = a, b;
7.        
        d = (a, b);
8.        
        cout << c << ' ' << d;
9.        
        return 0;
10.        
    }
A. 5 6
B. 6 5
C. 6 7
D. none of the mentioned