Computer Science, asked by tiwarichanda985, 1 year ago

What is the effect of break statement in a switch statement?
Please give answer in ur own words.​

Answers

Answered by divyansh101dabral
1
when the compiler reaches the break statement in any case, the control of program comes out of switch, and the next statement after the closing braces of switch case is executed

for example

switch (ch)

{

case 1: //body of case 1

break;

case 2: // body

break;

}

// rest of the statements

after executing any case , the computer will reach break command, and will come out of switch to execute rest of the statements after brace ends.

MARK AS BRAINLIEST
Similar questions