When is a "switch" statement preferable over an "if" statement?
2 years ago
C Programming
The switch statement is best used when dealing with selections based on a single variable or expression. However, switch statements can only evaluate integer and character data types.
Sanisha Maharjan
Jan 20, 2022