SWITCH-CASE STATEMENT
Switch Statements
The switch and case statements help control complex conditional and branching operations. The switch statement transfers control to a statement within its body.Syntax:
The general form of a switch statement is:
switch (variable)
{
case expression1:
do something 1;
break;
case expression2:
do something 2;
break;
....
default:
do default processing;
}
Example :
0 comments:
Post a Comment