+ 4
Can anyone guess the difference between switch case and else if lader?
confused
4 Respostas
+ 4
switch case is supported in few languages.
switch case is similar to multiple if elif else loops in a while loop
+ 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
+ 1
switch uses hash tables, so it is faster for large number of conditions.