switch statment in c 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: c switch case
switch (expression) {
case constant1:
// statements
break;
case constant2:
// statements
break;
default:
// default statements
}