void main()
{
int a=1;
cout<<a++<<"\t"<<++a<<"\t"<<a++<<endl;
}
if i execute the above program i should get 1 3 3.
but i'm getting different values when I executed this program.
The values that I get after execution are 3 3 1.
In fact its impossible to say what the output should be. Modifying a variable more than once in the same statement gives undefined results. There is no correct result. The only recommendation is: don't write code which causes undefined behaviour like this.