1.

Mention any TWO situations where the switch statement is preferable over the if-else statement .

Answer»

Hi everyone ,

If you have conditions where values are FIXED or you have options like 1,2,3,4 and so on. for example PROGRAM for automated complaint services where options are there and you have to CHOOSE any ONE according to your PROBLEMS. In such situations using SWITCH statement in the program is the best.



Discussion

No Comment Found