MCQ
Single Best Answer
Moderate
QWhich statement correctly compares if and switch?
ID: #24861
Control flow in programming
3 views
Question Info
#24861Q ID
ModerateDifficulty
Control flow in programmingTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
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