Computer Science, asked by majarunisa, 1 year ago

explain with the help of an example ,the purpose of default in a switch statement.

Answers

Answered by shree1306
50
The switch and case keywords evaluate expression and execute any statement associated with constant-expression whose value matches the initial expression. If there is no match with a constant expression, the statement associated with the default keyword is executed.
hope it will help you
please give thanks.

majarunisa: thank u alot u helped for my exam
Answered by Anonymous
6

The switch and case keywords evaluate expression and execute any statement associated with constant expression whose value matches the initial expression. If there is no match with the constant expression, the statement associated with the default keyword is executed.

hope it helps you...

Similar questions