Please explain why:Code:int main() { int x = 5; double d = 3.5; double y = 2; while (x > 3) { printf(“%d\n”, x); d += (x % 2); x = x – 1; } /* a */ x = d > d ? x : (d / x); if (x < 1) y = x + 3; else if (x == 1) y = y – x; if (x == 1) y = y * y; /* b */ return 0; }
a) what is the value of x at the spot marked a? - I see it as 4. why is it really 3?
b) what is the output of the program ?
5
4 - why 4?
c) what is the value of d at the spot marked a? - 4 because it's d +=?
d) what is the value of x at the spot marked b? why 1
e) what is the value of y at the spot marked b? why 1