LearnFrenzy
Sign in Take a free test

Decision Making · Decision Making MCQ · Question 11

Which condition is always true? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 11 Back to Exercise

Which condition is true for every int x?

  • A x > 5 && x < 5
  • B x >= 18 || x <= 60 Correct
  • C x == 0
  • D x > 0 && x < 100
Correct Answer: Option B

Any x is either at least 18 or at most 60, so the || condition always holds – a common bug where && was meant. The first option can never be true.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links