09. C++ switch statement
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case. Syntax The syntax for a switch statement in C++ is as follows − switch(expression) { case constant-expression : statement(s); break; //optional case constant-expression : statement(s); break;… Read More »