Single Choice
Moderate
QProgram to test even number uses:
ID: #25955
MCQ Quiz - Class 8 - Decision Control Structure
3 views
Question Info
#25955Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
Correct Answer Explanation:
Test if n % 2 == 0 — if remainder is 0 when divided by 2, the number is even. Uses modulo and if.
Why the other options are incorrect:
- Option B: Addition doesn't determine parity.
- Option C: Division alone gives quotient, not parity.
- Option D: Multiplication doesn't test parity.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic