Concept Flow - Switch statement execution
Evaluate expression
Compare with case 1
Compare with case 2
Execute case 1
Break?
Yes→Exit switch
No
Execute next case
Repeat break check
If no match
→Execute default case if exists
Exit switch
The switch statement evaluates an expression and compares it to each case. When a match is found, it executes that case's code until a break is encountered or the switch ends.