Question 4
Back to Exercise
How is a = b = c = 0; grouped?
- A ((a = b) = c) = 0
- B a = (b = (c = 0)) Correct
- C It is a syntax error
- D Only a is set
Correct Answer: Option B
Assignment is right-associative, and its value is the value assigned. So c is set to 0, that value is assigned to b, then to a.
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!