AllInfoHub Logo

AllInfoHub – MCQ Practice

Operators and Expressions – Multiple Choice Questions (MCQs)

  1. 49. Which operator is used for the bitwise complement (NOT) in C?

    • A. !
    • B. &
    • C. |
    • D. ~
  2. 50. What is the value of `~5` (assuming 8-bit signed integer)?

    • A. -6
    • B. 6
    • C. 4
    • D. -5
  3. 51. Which of the following operators has the lowest precedence?

    • A. Arithmetic operators
    • B. Relational operators
    • C. Logical operators
    • D. Assignment operators
  4. 52. Which of the following operators has the highest precedence?

    • A. Arithmetic operators
    • B. Relational operators
    • C. Logical operators
    • D. Assignment operators
  5. 53. What is the associativity of the unary operators (+, -, ++, --, !)?

    • A. Left-to-right
    • B. Right-to-left
    • C. Depends on the operand
    • D. Not applicable
  6. 54. What is the associativity of the relational operators (>, <, >=, <=, ==, !=)?

    • A. Left-to-right
    • B. Right-to-left
    • C. Depends on the operands
    • D. Not applicable
  7. 55. What is the associativity of the logical operators (&&, ||)?

    • A. Left-to-right
    • B. Right-to-left
    • C. Depends on the operands
    • D. Not applicable
  8. 56. What is the associativity of the conditional operator (?)?

    • A. Left-to-right
    • B. Right-to-left
    • C. Depends on the operands
    • D. Not applicable
  9. 57. What is the order of evaluation of operands in an expression in C?

    • A. Left-to-right
    • B. Right-to-left
    • C. Unspecified
    • D. Depends on the operator
  10. 58. What is an l-value in C?

    • A. A literal value
    • B. The right-hand side of an assignment
    • C. An expression that can appear on the left-hand side of an assignment
    • D. A constant
  11. 59. What is an r-value in C?

    • A. An expression that appears on the right-hand side of an assignment
    • B. A variable name
    • C. An expression that can appear on the left-hand side of an assignment
    • D. A memory address
  12. 60. Which operator is used for pointer dereference in C?

    • A. *
    • B. &
    • C. ->
    • D. .