c syntaxe switch code example
Example 1: c switch
int i;
switch (i){
case 1:
//The Proccess you want to be executed
break;
case 2:
//The Proccess you want to be executed
break;
default:
break;
}
Example 2: switch case c
switch (expression) {
case constant1:
// statements
break;
case constant2:
// statements
break;
default:
// default statements
}