Examveda
Examveda

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.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions