Bird
0
0

Which logical operator in C returns true if either one or both conditions are true?

easy📝 Conceptual Q1 of 15
C - Operators and Expressions
Which logical operator in C returns true if either one or both conditions are true?
A|| (logical OR)
B&& (logical AND)
C! (logical NOT)
D& (bitwise AND)
Step-by-Step Solution
Solution:
  1. Step 1: Understand logical OR operator

    The logical OR operator (||) returns true if at least one condition is true.
  2. Step 2: Compare with other operators

    Logical AND (&&) requires both true, NOT (!) negates, and & is bitwise, not logical.
  3. Final Answer:

    || (logical OR) -> Option A
  4. Quick Check:

    Logical OR = || [OK]
Quick Trick: || means OR: true if any condition is true [OK]
Common Mistakes:
  • Confusing bitwise & with logical &&
  • Using ! instead of ||
  • Thinking && means OR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes