{
int x=1,y=1,z=1;
x+=y+=z;
printf(“%d\n”,x<y?y:x);
printf(“%d\n”,x<y?x++:y++);
printf(“%d\n”,x);printf(“%d\n”,y);
printf(“%d\n”,z+=x<y?x++:y++);
printf(“%d\n”,y);printf(“%d\n”,z);
x=3,y=z=4;
printf(“%d\n”,z>=y>=x?1:0);
printf(“%d\n”,z>=y&&y>=x)
step (1) here we have three operator
step (2) >= will be executed first than conditional operator because of more precedence.
step (3) we know if there are more than one operator of same type then we see associativity and for >= opreator we move left to right side.
hence….here
ist statement z>=y>=x?1:0 will be seen as
z>=y true so 1 now is becomes
1>=x?1:0
1>=x false 0 now it becomes
0?1:0
this is conditional operator
result is 0
similerly we see next statement .
we execute first
uniary operators ,
binary operator
, logical operators
shifting operators
logical
then assignment operators