Computer Science, asked by anupamadakra1982, 1 month ago

5. What will be the result stored in x after evaluating the following expression ? int x=4; x+=(x++) + (++x) + x; ​

Answers

Answered by diya3238
1

Explanation:

20

x = x + ( (x++) + (++x) + x) = 4 + ((x++) + (++x) + x) = 4 + ((4++) + (++x) + x) = 4 + (4 + ++5 + x) = 4 + (4 + 6 + 6) = 4 + 16 = 20

Similar questions