Interview Questions

When is a switch statement better than multiple if statements?

C Interview Questions and Answers


(Continued from previous question...)

When is a switch statement better than multiple if statements?

A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type.

(Continued on next question...)

Other Interview Questions