Computer Science, asked by VikashAron, 1 year ago

what is the importance of break and Default statement in switch

Answers

Answered by Shubhavatsala
4
break statement is used to bring the program control out of the switch expression while default statement is the last statement of the switch case.it is an optional statement.It executes only when the value stored in switch expression does not match with any case.
Answered by chander6901
0

Answer:

The break statement takes the flow of control out of the switch statement. Without the break statement, execution would simply continue to the next case. The default is the last statement of the switch case. It is an optional statement. It executes only when the values stored in switch expression does nat match any case

Similar questions