what is the purpose of default in a switch
Answers
Answered by
4
A switch statement can have an optional default case, which must appear at the end of the switch. The default case can be used for performing a task when none of the cases is true. No break is needed in the default case.
Answered by
2
Answer:
A switch statement can have an optional default case, which must appear at the end of the switch. The default case can be used for performing a task when none of the cases is true. No break is needed in the default case.
Explanation:
please mark as brilliant
Similar questions
Math,
4 months ago
Social Sciences,
4 months ago
Math,
4 months ago
Accountancy,
8 months ago
English,
8 months ago
Hindi,
1 year ago
Math,
1 year ago
Math,
1 year ago