AllInfoHub Logo

AllInfoHub – MCQ Practice

Operators and Expressions – Multiple Choice Questions (MCQs)

  1. 13. Which operator is used for logical OR in C?

    • A. &&
    • B. ||
    • C. !
    • D. |
  2. 14. Which operator is used for logical NOT in C?

    • A. &&
    • B. ||
    • C. !
    • D. ~
  3. 15. What is the result of the expression `(5 > 3) && (10 < 12)`?

    • A. 0
    • B. 1
    • C. TRUE
    • D. FALSE
  4. 16. What is the result of the expression `(5 < 3) || (10 < 12)`?

    • A. 0
    • B. 1
    • C. TRUE
    • D. FALSE
  5. 17. What is the result of the expression `!(5 > 3)`?

    • A. 0
    • B. 1
    • C. TRUE
    • D. FALSE
  6. 18. Which operator is used for bitwise AND in C?

    • A. &&
    • B. ||
    • C. !
    • D. &
  7. 19. Which operator is used for bitwise OR in C?

    • A. &&
    • B. ||
    • C. !
    • D. |
  8. 20. Which operator is used for bitwise XOR in C?

    • A. ^
    • B. &
    • C. |
    • D. ~
  9. 21. Which operator is used for left bit shift in C?

    • A. <<
    • B. >>
    • C. &
    • D. |
  10. 22. Which operator is used for right bit shift in C?

    • A. <<
    • B. >>
    • C. &
    • D. |
  11. 23. What is the value of `5 << 2`?

    • A. 5
    • B. 10
    • C. 20
    • D. 1
  12. 24. What is the value of `16 >> 2`?

    • A. 2
    • B. 4
    • C. 8
    • D. 16