+ 2
when we use switch statement
14 Respostas
+ 2
It is a kind of alternative to if-else if-else loop. Excetion is, you choose option and then break or continue. Cheers Happy Coding
+ 1
basically when more check and validate situations are present like going through all the days in week and months of a year we use switch..
+ 1
when you have too many conditions to handle....
Instead of using so many if statements we use switch.....
+ 1
if there is more conditions,to decrease coding we can't use if else if else repetitively so to make it properly indented we use switch
+ 1
when we hav many conditions and want to perform any one condition for single time by taking the input from the user and to perform that specified task.
0
If We have more choice then we use the switch statementâŠsimpleâŠ
0
same (if statement ) when you want do condition
0
ya we use it according to tha problem
0
Yeah it's simple!
0
for conditional purpose
0
It's an alternative for so many if statements.....
0
Most of the time when there are predefined and know set of possible (or needed) values or there're lot of if statements which slows down the execution of program
0
in menu driven problems
0
It's basically for a menu driven type programs ! Hope u get that ;)