Explain the equation and its answer

12 Views Asked by At
#include <iostream>
using namespace std;

int main() {
    // your code goes here
    int x=3;
    int y;
    y = x+ (--x) + (x++) + x + (++x);
    cout << y << endl;
    return 0;
}

The output of is 13. But it should be 14. Any explanation please ???????

0

There are 0 best solutions below