Advertisements. 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 switch case.
Read moreWhat is default in C programming?
The default statement is executed if no case constant-expression value is equal to the value of expression . If there’s no default statement, and no case match is found, none of the statements in the switch body get executed. There can be at most one default statement.3 Ağu 2021
Read more