Sheeshy Sipgrark
New member
What will be the output of the following C code?
A. 0, 4, 2, 1
B. 0, 5, 2, 1
C. -1, 4, 1, 1
D. 0, 5, 1, 0
Code:
#include <stdio.h>
int main()
{
int a = -1, b = 4, c = 1, d;
d = ++a && ++b || ++c;
printf("%d, %d, %d, %d\n", a, b, c, d);
return 0;
}
B. 0, 5, 2, 1
C. -1, 4, 1, 1
D. 0, 5, 1, 0