Computer Science, asked by kumar121212, 1 year ago

what is the purpose of default clause in switch statement ?Pls answer me soon​ .......


kumar121212: pls fast

Answers

Answered by mn121
1

Let's us assume that there is a switch case like the following :

switch(ch)

{

case 1: .....

break;

case 2: ....

break;

default: ....

}

In this if the user enters the choice other than 1 and 2 , the control goes to default.

It is not necessary to use default in switch case....

Hope it helps you...

Please mark it as brainliest....

^_^

Similar questions