It's undefined !! Basically, in C and C++, if you read a variable twice in an expression where you also write it, the result is undefined. Don't do that. Another example is:
v[i] = i++;Related example:
f(v[i],i++);Here, the result is undefined because the order of evaluation of function arguments are undefined.
You can even check it from Bjarne's own blog on C++ FAQs.