Possible Duplicate:
Behavior of post increment in cout
//Increment Decrement
#include <iostream>
using namespace std;
int main()
{
int a=5,b=6;
cout<<++a<<a++<<++a<<++a<<++a;
return 0;
}
My expected output should be 108876 but g++ compiler shows the output as 108101010