what is the purpose of using default case in switch statement
Answers
Answered by
6
Question:- What is the purpose of using default case in switch sstatement ?
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.
Similar questions
Social Sciences,
1 month ago
Math,
1 month ago
Science,
1 month ago
Biology,
4 months ago
Business Studies,
4 months ago
Science,
10 months ago
Biology,
10 months ago