Question 8
Back to Exercise
What is the value of x after int x = (4, 7, 9);?
- A 4
- B 7
- C 9 Correct
- D 20
Correct Answer: Option C
The comma operator evaluates operands from left to right, discards all but the last, and yields the last one. The brackets matter: the comma has lower precedence than =.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!