Computer Science, asked by shreyaberry920, 10 months ago

URGENT—What is the purpose of default in switch?



♡♡GUYS PLZ HELP ME AS WM HAVING MAH ONLINE EXAM TODAY PLZ PLZ PLZ♡♡​

Answers

Answered by ap1861450
1

Answer:

default clause in switch statement works as the same as else clause in if else block. To simplify my statement, when no cases in the switch clause matches with the proper condition, then default clause is executed

Explanation:

please mark as branlist

Answered by SnowyPríncess
2

Explanation:

The purpose of the default in the switch case is to provide an option in case the conditions specified to trigger the execution of the code within the other options does not occur so that the program will not crash.

Please mark me as brainlist

and Follow me

Similar questions