AllInfoHub Logo

AllInfoHub – MCQ Practice

Operators and Expressions – Multiple Choice Questions (MCQs)

  1. 61. Which operator is used to get the address of a variable in C?

    • A. *
    • B. &
    • C. ->
    • D. .
  2. 62. Which operator is used to access members of a structure through a pointer in C?

    • A. .
    • B. &
    • C. *
    • D. ->
  3. 63. Which operator is used to access members of a structure directly in C?

    • A. ->
    • B. &
    • C. *
    • D. .
  4. 64. What is the value of the expression `5 / 2.0` in C?

    • A. 2
    • B. 2.5
    • C. 2
    • D. 3
  5. 65. What is the value of the expression `(float) 5 / 2` in C?

    • A. 2
    • B. 2.5
    • C. 2
    • D. 3
  6. 66. What is the value of the expression `5 / (float) 2` in C?

    • A. 2
    • B. 2.5
    • C. 2
    • D. 3
  7. 67. What is the value of the expression `(int) 5.7` in C?

    • A. 5.7
    • B. 6
    • C. 5
    • D. 0
  8. 68. What is the value of the expression `(int) -5.7` in C?

    • A. -5.7
    • B. -6
    • C. -5
    • D. 0
  9. 69. Which operator is used for the comma operator in C?

    • A.
    • B.
    • C. ;
    • D. .
  10. 70. What is the purpose of the comma operator in C?

    • A. To separate function arguments
    • B. To separate variable declarations
    • C. To evaluate expressions from left to right and return the value of the rightmost expression
    • D. To terminate a statement
  11. 71. What is the value of the expression `(a = 5, b = 10, a + b)`?

    • A. 5
    • B. 10
    • C. 15
    • D. 20
  12. 72. Which of the following is a relational operator?

    • A. +
    • B. *
    • C. =
    • D. ==