what is the effect of absence of break in a switch statement
Please give ur answer in ur own words
Answers
Answered by
23
The break keyword causes the entire switch statement to exit, and the control is passed to statement following the switch.. case construct. Without break, the control passes to the statements for the next case. The break statement is optional in switch..case construct.
tiwarichanda985:
google answer
Answered by
2
The effect of the absence of break in a switch statement is as follows:
- The break keyword exits the switch statement, and control is given to the next statement after the switch case construct.
- If there is no break, control is passed to the next case's statements.
- The program proceeds without a break to the next labelled statement, executing it until a break or the end of the statement is reached.
- For appropriate evaluation of the switch construct, every case expression must include a break statement.
Similar questions
Social Sciences,
7 months ago
Political Science,
7 months ago
Math,
1 year ago
Geography,
1 year ago
History,
1 year ago