A

Admin • 833K Points
Coach

Q. Without a break statement in switch what will happen?

  • (A) All cases will work properly
  • (B) Cases will fall through after matching the first check
  • (C) Switch will throw error
  • (D) All of these
  • Correct Answer - Option(B)
  • Views: 29
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

The break statement is used to terminate the current flow of code. And if it is not present in the switch statement, the cases will execute all cases after the matched case.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.