Possible Duplicate:
What is the correct answer for cout << c++ << c;?
this is my piece of code:
#include <iostream>
using namespace std;
int main(){
int val = 10;
cout << "\n" << val++<< " "<< ++val << " " << val;
cin.get();
return 0;
}
The output returns
11 12 12
But shouldn't it be
10 12 12
?
I read somewhere that in case of cascading multiple values, the calculations go from right to left but the printing takes place from left to right as usual. Is that true ?