Single Choice Moderate

QFor (n%2==0) true means:

ID: #25960 MCQ Quiz - Class 8 - Decision Control Structure 7 views
Question Info
#25960Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - Decision Control StructureTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Number is even
  • B Odd
  • C Negative
  • D Prime
Correct Answer

Explanation

Correct Answer Explanation:

If n divided by 2 leaves 0 remainder, the number is exactly divisible by 2 — meaning it's even.

Why the other options are incorrect:

  • Option B: Odd numbers have n%2 == 1.
  • Option C: Sign is checked with n>0 or n<0.
  • Option D: Prime check needs a different algorithm.

Share This Question

Challenge a friend or share with your study group.