0
Please answer my Q
#include <iostream> using namespace std; int main () [ int y,x,z; y=x=z=1; y= ++x + ++x + x++; z - =x; cout <<x<<y<<z; return o; ]
2 Respostas
+ 2
Output is 4 9 -3
Because
First x is 1 then due to 2 pre increments
x becomes 3 and then
y=3+3+(3++)
So y is 9
And x becomes 4
Then z=z-x
Thus z is 1-4 that is -3
/*Note different compilers treat in different ways*/
- 3
x=1
y=8
z=0