C

Chandani • 9.82K Points
Tutor III

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

Explanation by: Chandani
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.


Question analytics