Examveda
Examveda

What is the result of the expression 1 && 0 in C?

A. 1

B. 0

C. TRUE

D. FALSE

Answer: Option B

Solution(By Examveda Team)

In C, the && operator is the logical AND operator. It returns 1 (TRUE) if both operands are true (non-zero), and 0 (FALSE) if any of the operands is false (zero). In this expression, the second operand is 0, which is false. Therefore, the result of the expression is 0 (FALSE).

Option A (1) is incorrect because the result of the expression is 0, not 1.
Option C (TRUE) represents the true value, but the result of the expression is 0 (FALSE).
Option D (FALSE) represents the false value, which is the correct result of the expression.

This Question Belongs to C Program >> Operators And Expressions

Join The Discussion

Related Questions on Operators and Expressions