Which operator is used for logical OR in C?
A. &&
B. |
C. &
D. ||
Answer: Option D
Solution(By Examveda Team)
In C, the || operator is used for logical OR. It returns true (1) if at least one of the operands is true, otherwise, it returns false (0).Option A (&&) represents the logical AND operator.
Option B (|) represents the bitwise OR operator.
Option C (&) represents the bitwise AND operator in C.
Therefore, Option D (|| ) is the correct answer.
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
Join The Discussion