1.

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

Answer»

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 ☺️



Discussion

No Comment Found