176k views
2 votes
Why do we use case 1 and case 0 in nested switch statement before writing embedded switch statement

Why do we use case 1 and case 0 in nested switch statement before writing embedded-example-1
User Rwd
by
4.3k points

1 Answer

7 votes

Step-by-step explanation:

The fundamental difference between if-else and switch statements is that the if-else statement “selects the execution of the statements based upon the evaluation of the expression in if statements”. The switch statements “selects the execution of the statement often according to a keyboard command”.

Have a great day. <3

User Julietta
by
5.1k points