I did not really understand the use of break; in the case of switch statements. Can someone please explain it to me?
The optional break statement associated with each case label ensures that the program breaks out of switch once the matched statement is executed and continues execution at the statement following switch. If break is omitted, the program continues execution at the next statement in the switch statement.
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.