switch statement
switch statement
Executes code according to the value of an integral argument.
Used where one or several out of many branches of code need to be executed according to an integral value.
Syntax
switch ( expression ) statement |
expression | - | any expression of integer type (char, signed or unsigned integer, or enumeration) |
statement
|