Vidyalelo
C Programming · Q26

Operators and Expressions

Programming · C Programming · question 26

Q26

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

A.
1
B.
0
Answer
C.
TRUE
D.
FALSE

Answer: Option B

Solution

Answer: Option B
Solution:
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.