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
Computer Science,
2 months ago
Math,
2 months ago
Math,
2 months ago
Accountancy,
4 months ago
English,
4 months ago
Hindi,
9 months ago
Math,
9 months ago
Math,
9 months ago