0

Can anyone tell me how it's 3 it should be 1 right cause c='a' so by first condition of switch case it should be 1

https://www.sololearn.com/post/772186/?ref=app

20th Nov 2020, 1:42 PM
Rai
Rai - avatar
4 Respostas
+ 1
There is no `break` statement in case 'a' block, so the execution flows down through, adding 2 before it breaks out of the `switch`.
20th Nov 2020, 2:08 PM
Ipang
+ 2
Yes you're right 👍
20th Nov 2020, 2:33 PM
Ipang
+ 1
Ooh so it goes till case 2 and then stops right?
20th Nov 2020, 2:25 PM
Rai
Rai - avatar
+ 1
Thanks 👍
20th Nov 2020, 4:54 PM
Rai
Rai - avatar