Single Choice Moderate

Qif(a>b) print a; else print b; finds:

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

Choose the Best Option

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

  • A Max of two
  • B Min of two
  • C Average
  • D Sum
Correct Answer

Explanation

Correct Answer Explanation:

If a is greater, print a; otherwise print b — always prints the larger value.

Why the other options are incorrect:

  • Option B: This finds max, not min.
  • Option C: Average would compute (a+b)/2.
  • Option D: Sum would add them: a+b.

Share This Question

Challenge a friend or share with your study group.