int main(int argc, char* argv[])
{
int a=3,b=2,c;
a=a==b==0;
printf("%d\n",a);
return 1;
}
I cannot understand why this code gives 1 as the answer.
According to me , this should be the order of evaluation
b==0, which gives false & the expression becomes a=a==0
this should again give false & the expression should become
a=0
thereby the value of a should be 0