Advertisements
Advertisements
Question
Is it necessary to include default case in a switch statement? Justify.
Answer in Brief
Solution
Yes. When no case is available for a given switch variable value, the 'default' case displays a message to the user indicating the incorrect decision.
shaalaa.com
Is there an error in this question or solution?