State the value of a, b and c after the execution of each of the following statements where a=12, b=13 and c=11:

**a=a++ + –b + c++**

Ans. a=35, b=12, c=12

**b=b++ + ++a * 2**

Ans. a=13, b=39, c=11

**c=c++ + a++ * (++b)**

Ans. a=13, b=14, c=179

**b=b++ + ++b + c++ + ++a**

Ans. a=13, b=52, c=12

**a= –a + b++ + ++a + – –b * c++**

Ans. a=179, b=13, c=12

**a+=a++ + ++b – c++**

Ans. a=27, b=14, c=12

**b+= – –c + ++c + a++ + (b++)**

Ans. a=13, b=59, c=11

**c+=a– – + – –a + (b++) * (++b)**

Ans. a=10, b=15, c=228

**a+=a++ + ((++b)/2)**

Ans. a=31, b=14, c=11

**Give the output of the following method:**

int test()

{

int a = 5;

a++;

a-=(a–)-(–a);

return a;

}

**Ans. **4

Please follow and like us: