Computer Science, asked by GothaalaSheoran1843, 1 day ago

Example where if else is preferred over switch

Answers

Answered by ritikraj3204
0

Answer:

YES

Explanation:

A switch statement is usually more efficient than a set of nested ifs. The compiler can do this because it knows that the case constants are all the same type and simply must be compared for equality with the switch expression, while in case of if expressions, the compiler has no such knowledge. ...

Similar questions