title: what is the difference between printf and cout
body: <p>Some code like this below:</p>
  
  <pre><code>int x = 1;
  printf("%d,%d,%d",x,x++,x);  //A  statement
  cout&lt;&lt;x&lt;&lt;x++&lt;&lt;x&lt;&lt;endl; //B statement
  </code></pre>
  
  <p>I know the execute sequence is from right to left,while why A statement result is "1,1,1"
  and B statement result is "112"???</p>
  
  <p>I use vs2008
  with debug mode : the result is same: 2,1,2.
  with release mode: the result is different:  A: 1,1,1, B:1,1,2</p>