Computer Science, asked by cheifmarkyt, 9 months ago

int a=13, b=33, c; c = a++ + ++b - a++ + b++ + ++a + b - ++a - b++;

Answers

Answered by VedankMishra
2

Explanation:

Your output comes out to be 34, not 36.

When the value of a is 10:

Break your question into steps, Step1: "b=a++" the value here will be taken as 10 (Post Increment: Value of a will be incremented but a++ shows only the original value of a), Step2: "b=a++ + '++a'" the value of ++a would be 12. Step3: "b=a++ + ++a + '++a'" the value for a third time would be taken as 12 only. Sum is 34.

Similar questions