Computer Science, asked by queen31, 1 year ago

In switch statement, what is the purpose of default section?

Answers

Answered by sharansss114
0
if the user enters a wrong value the default will be executed
Answered by Anonymous
1

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