In the if statement, i / j is 2 / 1, which is true. Therefore, the if block is executed, and j += j; doubles the value of j (j becomes 2).
After the if-else statement, printf("%d", i + j); prints the sum of i and the updated val-ue of j (2 + 2), which is 4.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit