Question: what is the difference between switch case and else if ladder?
Answer: Basic difference is in the syntax of both. In else if, the control goes through the every else if statement until it finds true value of the statement or it comes to the end of the else if ladder. In case of switch case, as per the value of the switch, the control jumps to the corresponding case.