I don't quite understand how the if statement in this case works. It evaluates the x != 0
statement and when that is not true anymore, it assigns z
to y
and then break
s the if statement?
int main()
{
int x, y, z, i;
x = 3;
y = 2;
z = 3;
for (i = 0; i < 10; i++) {
if ((x) || (y = z)) {
x--;
z--;
} else {
break;
}
}
printf("%d %d %d", x, y, z);
}