LearnFrenzy
Sign in Take a free test

Control Flow Statements · Control Flow MCQ · Question 7

Several labels in one arrow case Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 7 Back to Exercise

Which is valid switch-expression syntax for "Saturday or Sunday"?

  • A case SAT || SUN ->
  • B case SAT, SUN -> Correct
  • C case SAT: SUN ->
  • D case (SAT, SUN):
Correct Answer: Option B

Labels are separated by commas.

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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links