Increment and Decrement

1

Which concepts does the preincrement uses?

A. call by value
B. call by reference
C. queue
D. None of the mentioned

2

Pick out the correct statement

A. Preincrement is faster than postincrement.
B. postincrement is faster than preincrement.
C. Both a & b
D. None of the mentioned

3

What is the output of this program?

1.
    #include  
2.
    using namespace std;
3.
    int main()
4.
    {
5.    
        int num1 = 5;
6.
        int num2 = 3;
7.
        int num3 = 2;
8.
        num1 = num2++;
9.
        num2 = --num3;
10.
        cout << num1 << num2 << num3;
11.
        return 0;
12.
    }
A. 532
B. 235
C. 235
D. 311

4

What is the output of this program?

1.
    #include  
2.
    using namespace std;
3.
    int main()
4.
    {
5.
        int x = 5, y = 5, z;
6.
        x = ++x; y = --y;
7.
        z = x + ++x;
8.
        cout << z;
9.
        return 0;
10.
    }
A. 11
B. 12
C. 13
D. 14

5

What is the output of this program?

1.
    #include 
2.
    using namespace std;
3.
    int main()
4.
    {
5.
        int x = 5, y = 5, z;
6.
        x = ++x; y = --y;
7.
        z = x++ + y--;
8.
        cout << z;
9.
        return 0;
10.
    }
A. 10
B. 11
C. 9
D. 12