Discuss Switch case or Switch statement
Switch Case or Switch Statement :- This is a multi dimensional conditional control statement there is a need in program to make choice among number of alternatives. For making this choice,we use the switch statement.
This can be Written as :-
switch (expression)
{
case constant-1: block-1;
break;
case constant-2: block-2;
break;
......................................
.....................................
case constant-n: block-n;
break;
default:
default block;
}
statement- x;
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment