As you said thats the short-circuit problem In the first case, ++z>5 evaluates to true, so the ++z>6 will not be evaluated(because '||' is a short-circuit operator) where as in the second case, even when the first operand evaluates to true ++z>6 will be executed giving the output as 8
Tomorrow is the first day of the new metric calendar. Comfort me tiny ad:
a bit of art, as a gift, that will fit in a stocking