Vidyalelo
C Programming · Q198

C Fundamentals

Programming · C Programming · question 198

Q198

What will be the output of the following C code? #include int main() int a = -1, b = 4, c = 1, d; d = ++a && ++b || ++c; printf("%d, %d, %d, %d ", a, b, c, d); return 0;

A.
0, 4, 2, 1
Answer
B.
0, 5, 2, 1
C.
-1, 4, 1, 1
D.
0, 5, 1, 0

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board