Computer Science, asked by tiwarichanda985, 1 year ago

what is the effect of absence of break in a switch statement
Please give ur answer in ur own words ​

Answers

Answered by rahulgrover033
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
tiwarichanda985: lol
Answered by Hansika4871
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