?
Which operator is used for logical OR in C?
Answer & Solution
Correct Answer:
Option
D
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.
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.
Join the Discussion
Login to post a comment or share your explanation.
Login