Switch is a Control Flow statement. It is use to evaluate expressions. Look at this code snippet:
char grade = 'A';
switch(grade) {
case 'A' :
printf("Excellent!\n" );
break;
case 'B' :
case 'C' :
printf("Well done\n" );
break;
default :
printf("Invalid grade\n" );
}
Above statement evaluates the value of the variable grade. The switch statement look each case then print the corresponding statement.