Technical Discussion :: C
Home > Technical Interview Q&A > C > Discussion
5 / 123
When is a switch statement better than multiple if statements?
Answer:
A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type.
Asked In ::
Dreamer
23 Feb, 2019 5:07 AM
A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type.