he expression a++ && b++ involves the logical AND (&&) operator. In C, the logical AND op-erator short-circuits, meaning that if the left operand (a++ in this case) is false, the right operand (b++) is not evaluated.
Initially, a is 0, and b is 1. The result of a++ is 0 (false), so b++ is not evaluated. The value of b remains 1. The printf statement then prints the value of b, which is 1.
Therefore, the correct answer is "The program outputs 1."
References = CLA – C Associate Programmer documents
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