+ 4

Can anyone guess the difference between switch case and else if lader?

confused

7th Sep 2017, 3:06 AM
Surendra
Surendra - avatar
4 Respostas
+ 4
switch case is supported in few languages. switch case is similar to multiple if elif else loops in a while loop
7th Sep 2017, 3:23 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
in else if lader: if the condition is true the control is skiped out of the lader in switch case : it executes until required data is found then u must put the break keyword in the each case otherwise it continues the executing after the required data is found until default is reached
7th Sep 2017, 4:24 PM
Surendra
Surendra - avatar
+ 1
switch uses hash tables, so it is faster for large number of conditions.
7th Sep 2017, 6:14 AM
Testing003