Switch Case Statements In C language

C Switch Case Definition

The switch-case statement causes a particular group of statements to be selected from a group of options.

The selection is based upon the current value of the expression which is specified with the SWITCH statement.

The switch statement allows a number of choice. In C, switch statement check the value of given variable or statement against a list of case values and when the match is found a statement-block of the case is executed.

Switch statement is also called as multiway decision statement.





 Enter Number: 5

 Enter Number: 1

 //default case//
 Enter Number From 1 to 7: 8
 Enter days between 1 - 7

Read Also: