Computer Science, asked by Ashmu89, 6 months ago

differentiate between if else if and switch case​

Answers

Answered by Anonymous
8

Answer:

In the case of 'if-else' statement, either the 'if' block or the 'else' block will be executed based on the condition. In the case of the 'switch' statement, one case after another will be executed until the break keyword is not found, or the default statement is executed.

Answered by asifraaz943
3

Explanation:

if else statement uses multiple statement for multiple choices, but switch cases uses a single expression for multiple choices.

if else statement test for equality as well as for logical expression, but switch cases statement test only for equality.

Similar questions