I was trying to understand the working of switch
in C, and after browsing through some of the answers on SO, I fumbled upon the following piece of answer on SO :-
Basically, a switch acts like a goto to the appropriate label -- intervening statements aren't executed. Variable definitions (which actually happen at compile time) do happen, but if they contain initialization, that's skipped too.
How does switch statement work?
Can anybody please explain the meaning of this statement or provide some more insight into the working of switch
.
`