I\'ve been thinking of some beginner mistakes and I ended up with the one on the if statement. I expanded a bit the code to this:
if
int i = 0; if
It has to do with parsing an the right to left rules. Eg y = x+5. All sub-expressions are weighted in importance. Two expressions of equal importance are evaluated right to left, . The && expression side is done first, followed by the LHS.
Makes sense to me.