Switch Statement in C
The switch statement is useful when a value needs to be compared against multiple constant cases.
Syntax
switch (expression) {
case value:
// code
break;
default:
// code
}
The break statement stops execution from continuing into the next case.