Multiple Choice
Moderate
QWhich statement correctly compares if and switch?
ID: #24861
Control flow in programming
10 views
Question Info
#24861Q ID
ModerateDifficulty
Control flow in programmingTopic
Your Answer
Select All That Apply
Tick every correct option, then press Check Answer.
Correct Answer
Explanation
Correct Answer:
✅ (b) if is better for ranges, switch is for exact matches
Explanation:
-
ifis useful for conditions likemarks > 80 -
switchis useful for exact values like"Monday"
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic