difference between switch statement and if else
Answers
Answered by
1
Answer:
Switch and if else are used in conditional statements.
Explanation:
Switch can only test for equality whereas if else can evaluate relational or logical expressions also.
if else is more versatile.
if else can handle floating point tests whereas switch cannot.
I hope that helped you
Similar questions
Math,
4 months ago
Math,
4 months ago
Social Sciences,
9 months ago
English,
9 months ago
World Languages,
1 year ago
English,
1 year ago