The Switch Statements

The switch statement is a mechanism for controlling the flow of the program based on exact values of one data. Often a switch statement is used in a menu, where the action to be performed is selected based on a value.