Computer Science, asked by shivam13112003, 11 months ago

why is it must to use break after each case in a switch statement ​

Answers

Answered by Anonymous
7

Answer:

In switch case, the break statement is used to terminate the switch case. Basically it is used to execute the statements of a single case statement. If no break appears, the flow of control will fall through all the subsequent cases until a break is reached or the closing curly brace '}' is reached...

hope it helps ☺️

Answered by MysticPetals
4

Answer:

We must use break statement after each case because it iterates the problem algorithmically.

If we use break statement, it stops... If its true it ends.. If its false it switch to other case.

Similar questions