Expressions Questions and Answers

Practice Mode
Showing 10 of 26 questions
Q11
Which operator has the highest precedence?
  • A *
  • B +
  • C ()
  • D =
Answer: Option C
Explanation: Parentheses have the highest precedence in C expressions.
Q12
What is the result of: ++x if x=5?
  • A 5
  • B 6
  • C 4
  • D Error
Answer: Option B
Explanation: Prefix increment increases value before using it.
Q13
What is the value of: x++ if x=5?
  • A 5
  • B 6
  • C 4
  • D Error
Answer: Option A
Explanation: Postfix increment uses value first, then increments.
Q14
Which is a relational operator?
  • A +
  • B =
  • C >
  • D &
Answer: Option C
Explanation: Relational operators compare values and return true/false.
Q15
What is the result of: 5 == 5?
  • A 0
  • B 1
  • C 5
  • D true
Answer: Option B
Explanation: == operator checks for equality and returns 1 for true.
Q16
Which is a logical operator?
  • A +
  • B -
  • C &&
  • D =
Answer: Option C
Explanation: Logical operators: && (AND), || (OR), ! (NOT)
Q17
What is: !0 (not zero) in C?
  • A 0
  • B 1
  • C true
  • D false
Answer: Option B
Explanation: ! operator returns 1 for false values and 0 for true values.
Q18
What is the result of: 10 > 5 && 3 < 2?
  • A 0
  • B 1
  • C true
  • D Error
Answer: Option A
Explanation: && requires both conditions to be true.
Q19
What is the value of: 8 | 3?
  • A 11
  • B 10
  • C 3
  • D 8
Answer: Option A
Explanation: Bitwise OR operation on binary values.
Q20
What is: 10 & 5?
  • A 0
  • B 10
  • C 5
  • D 15
Answer: Option A
Explanation: Bitwise AND operation on binary values.
Questions and Answers for Competitive Exams Various Entrance Test