Short-circuiting is part of the trace

Give the exact output, but also show a row for each initialization of a, b, c and d. Each row must list the left operand's value, whether the right operand is evaluated, the result stored, and the current x and y.

    Explain why this program does not divide by zero. Fully parenthesize the expression initializing d according to C precedence. State the possible numerical results of &&, || and ! in C; importing JavaScript's “return one of the operands” rule would give the wrong model.

#include <stdio.h>
int main(void)
{
    int x = 0;
    int y = 4;
    int a = x != 0 && 12 / x > 2;
    int b = y > 0 || ++x > 0;
    int c = x == 0 && ++y > 4;
    int d = 2 + 3 * 4 > 10 && !0;
    printf("a=%d b=%d c=%d d=%d x=%d y=%d\n", a, b, c, d, x, y);
    return 0;
}

