Operators
Operators
○ a) &
○ b) &&
○ c) |
○ d) ||
○ Answer: b) &&
2. Which operator is used for bitwise OR in C?
○ a) &
○ b) &&
○ c) |
○ d) ||
○ Answer: c) |
3. Which operator has the highest precedence?
○ a) +
○ b) *
○ c) ()
○ d) =
○ Answer: c) ()
4. What is the result of 5 / 2 in C?
○ a) 2.5
○ b) 2
○ c) 3
○ d) 2.0
○ Answer: b) 2
5. Which operator is used for the modulo (remainder) operation?
○ a) /
○ b) %
○ c) *
○ d) \
○ Answer: b) %
○ a) 5
○ b) 3
○ c) 8
○ d) 2
○ Answer: c) 8
6. Which operator is used for the "not equal to" comparison?
○ a) =
○ b) ==
○ c) !=
○ d) <>
○ Answer: c) !=
7. What is the result of 10 >> 2?
○ a) 2
○ b) 20
○ c) 5
○ d) 2.5
○ Answer: a) 2
○ a) 25
○ b) 30
○ c) 36
○ d) Undefined Behavior
○ Answer: d) Undefined Behavior (order of operations on
incrementing variables in a single expression can vary by
compiler)