According to C++, the order of operators is ORDER
I have the following code:
int x = 1, y = 5;
cout << x * y + ++x * y - x++;
which outputs 13. This means it will evaluate it in this order:
- x * y
- ++x
- (++x * y)
- x++
- subtraction
But I don't understand why. It does not follow the order of operators.