c switch sintax code example
Example 1: switch case c
switch (expression) {
case constant1:
// statements
break;
case constant2:
// statements
break;
default:
// default statements
}
Example 2: c switch case example
switch (variable or an integer expression)
{
case constant:
//C Statements
;
case constant:
//C Statements
;
default:
//C Statements
;
}