int i=5,j=10;
printf("%d\n",(i=15)||(j=26));
printf("%d %d\n",i,j);
THe output I expected was :
1
15 26
The actual output was:
1
15 10
In (i=15)||(j=26),
shouldn't the brackets be done first?Isn't that the precedence order?
So,first i must take 15 then j must take 26 then the || must be done.
The explanation I got was,that when 10 is assigned to i,immediately the || is noticed and since
one of the conditions is true the other one isn't taken care of.
But what happened to operator precedence?