SWITCH stmt is used for handling n number of decisions at a
time.
Hence it is also known as multi way decision making stmt.
SWITCH
STATEMENT can't be applied to float and
double.
Break stmt transfers the control out of
the switch stmt.
Syntax
switch(choice)
switch(choice)
{
case
1:block of stmt:-1;
break;
case
2:block of stmt:-2;
break;
…………………….
……………………..
………………………
case
n: block of stmt:-n;
break;
default:
invalid stmt;
break;
}
sample program