Computer Science, asked by shantisubba111, 4 months ago

what is the purpose of default in a switch​

Answers

Answered by yashg30
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 bhagyalatasahu23
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