0
#include <iostream> using namespace std; int main() { int x=2; cout <<(x-++--x); return 1; }
I don't understand this.
4 Respostas
+ 2
It's like + and + is +
+ and - is -
- and + is -
- and - is +...
x-+ +--x
=x-+ --x
=x-- -x
=x+-x
=x-x=0
+ 1
I am not sure but I think it's an error.
- 1
The operators cancel eachother out:
x-++--x
x-+--x
x---x
x+-x
x-x
Therefore output is 0.
- 1
it follows multiplication rule like
+*+ = +
+*- = -
-*- = +
here finally you get - so x-x = 0