Question 5
Back to Exercise
Which statement about case labels is true?
- A They can be any variable
- B They must be distinct integer constant expressions Correct
- C They must be in ascending order
- D They can be strings
Correct Answer: Option B
Each label must be known at compile time (a literal, character constant, enum constant or macro) and no two may be equal. Their order is free.
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!