Home »

When is a switch statement better than multiple if statements?

Question ListCategory: cWhen is a switch statement better than multiple if statements?
jeanderson295 author asked 8 years ago
1 Answers
shah_kajal184 author answered 8 years ago

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

Please login or Register to Submit Answer