When is a switch statement better than multiple if statements? Ans. A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type. For instance, rather than the code if (x == 1) printf("x is equal...
See more
Download the Study24x7 App, so you can connect and collaborate.