// Be very careful reusing a pre or post increment variable in an expression. int x = 2; int y = x++ * ++x; // result is y = 8; // it works as if you had coded: int x = 2; int a = x++; // a=2; x=3; int b = ++x; // b=4; x=4 int y = a * b; // y = 8