Advertisements
Advertisements
Question
In a switch statement, why is it necessary to use break after each case?
Answer in Brief
Solution
- In a switch statement, the break statement terminates the block.
- If the break is not used, the control will keep on executing other cases under the switch block.
shaalaa.com
Is there an error in this question or solution?