I was studying operator precedence and I am not able to understand how the value of x became 2 and that of y and z is
x
2
y
z
z=++x||++y&&++z;
NOTE: ++ has higher priority than ||
++
||
Now after this line is executed the value of x is incremented and x=2 now ++y&&++z are never executed as the first condition is true and hence you are getting the value as x=2 y=1 z=1
x=2
++y&&++z
x=2 y=1 z=1