How switch statement is different from if else statement?
Answers
Answered by
9
Explanation:
An if-else statement can evaluate almost all the types of data such as integer, floating-point, character, pointer, or Boolean. A switch statement can evaluate either an integer or a character. In the case of 'if-else' statement, either the 'if' block or the 'else' block will be executed based on the condition.
Similar questions
Math,
3 months ago
Accountancy,
3 months ago
Social Sciences,
3 months ago
Science,
6 months ago
English,
6 months ago
Math,
10 months ago
Biology,
10 months ago