+ 1
Why x has only changed?
int x=1,y=1,z=1; cout<<(++x||++y&&++z); cout<<x<<y<<z; Output:1211
2 Respuestas
+ 2
Because a good compiler stops its work, if nothing else is to do. If you change the expression from OR to AND, then all your variables will be increased. If the first condition is true, every following OR condition is completely irrelevant for the program. Due to that, it's not evaluated.
+ 1
Thanks Sandra Meyer..