After executing the following code fragment
int x=0,y=1,z=-1,m;
m=(x++)&&(y–)&&(z++);
the value of x,y and z are 1,1,-1 in turbo c++ and why not 1,0,0?
After executing the following code fragment
int x=0,y=1,z=-1,m;
m=(x++)&&(y–)&&(z++);
the value of x,y and z are 1,1,-1 in turbo c++ and why not 1,0,0?
It reads token x++ , makes the “and” result as zero and does not care for other tokens . Hence only x is incremented .