I was trying c programming and I wrote a small code but I am unable to understand this
#include<stdio.h>
int main()
{
int x,y,z,k;
x=y=z=k=1;
z=x++||y++&&k++;
printf("%d %d %d %d\n",x,y,z,k);
}
I was expecting output as 2 1 1 2 because the precedence of && is more than || but the output is 2 1 1 1 please explain.