int a = 3;
cout << ++a << a++ << ++a << a++ << endl;
The answer of this code snippet is 7573 on codeblocks::mingw. What i got till now is that post increment goes in the right way but the preincrement has some different logic. The last value of last preincrement will be same for all preincrements. Can anyone tell me what actually happens there with ++a.
And one more thing the code needs to be solved from Right to left. Thanks for any answer.