C++ switch - case - break

The switch statement evaluates an expression and matches the result to a case label. When a match is found, the corresponding block of code is executed. The break statement is used to exit the switch statement. If a break statement is not used, the program will continue to execute the code for subsequent case labels until a break statement is encountered.