Skipping break in case statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Skipping break in case statement

If i skip using break for a case How can compiler execute all the case statements untill it find a break??the switch variable which we compare will not be equal to every case right

11th Dec 2020, 3:44 PM
Pulluri Sai Lalith
Pulluri Sai Lalith - avatar
4 Answers
+ 1
You setted your your country "India" that mean you know hindi language if i am right A 8 minutes video will clear all your doubt related to switch statement in c language https://youtu.be/o9i80VNzf1g( Hindi ) Or if you want an English version you can go with https://youtu.be/-JMSaLRqsgo ( English ) Hope it will help you Happy coding ☺️
11th Dec 2020, 3:51 PM
Stuvan
Stuvan - avatar
0
Suppose x=2 according to u whats the output ?stmnt2 or both stmnt2and stmt3
11th Dec 2020, 4:33 PM
Pulluri Sai Lalith
Pulluri Sai Lalith - avatar
0
But after statement2 execution if it compares with 3 its not equal so why will it execute stmnt3
11th Dec 2020, 4:35 PM
Pulluri Sai Lalith
Pulluri Sai Lalith - avatar
0
Got it brother thanks
11th Dec 2020, 4:53 PM
Pulluri Sai Lalith
Pulluri Sai Lalith - avatar