AllInfoHub Logo

AllInfoHub – MCQ Practice

Operators and Expressions – Multiple Choice Questions (MCQs)

  1. 25. Which operator is used for assignment in C?

    • A. =
    • B. ==
    • C. +=
    • D. -=
  2. 26. Which operator is used for equality comparison in C?

    • A. =
    • B. ==
    • C. !=
    • D. >
  3. 27. Which operator is used for inequality comparison in C?

    • A. =
    • B. ==
    • C. !=
    • D. <
  4. 28. Which operator is used for greater than comparison in C?

    • A. >
    • B. <
    • C. >=
    • D. <=
  5. 29. Which operator is used for less than comparison in C?

    • A. >
    • B. <
    • C. >=
    • D. <=
  6. 30. Which operator is used for greater than or equal to comparison in C?

    • A. >
    • B. <
    • C. >=
    • D. <=
  7. 31. Which operator is used for less than or equal to comparison in C?

    • A. >
    • B. <
    • C. >=
    • D. <=
  8. 32. What is the value of 'a' after the execution of the following code? `int a = 10; a += 5;`

    • A. 5
    • B. 10
    • C. 15
    • D. 20
  9. 33. What is the value of 'b' after the execution of the following code? `int b = 10; b -= 3;`

    • A. 3
    • B. 7
    • C. 10
    • D. 13
  10. 34. What is the value of 'c' after the execution of the following code? `int c = 5; c *= 2;`

    • A. 2
    • B. 5
    • C. 10
    • D. 15
  11. 35. What is the value of 'd' after the execution of the following code? `int d = 12; d /= 4;`

    • A. 3
    • B. 4
    • C. 8
    • D. 12
  12. 36. What is the value of 'e' after the execution of the following code? `int e = 10; e %= 3;`

    • A. 1
    • B. 3
    • C. 7
    • D. 10