title: Behaviour of Pre-increment and Post increment in C++
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3986361/behavior-of-post-increment-in-cout">Behavior of post increment in cout</a>  </p>
  </blockquote>
  
  
  
  <pre><code>//Increment Decrement
  #include &lt;iostream&gt;
  using namespace std;
  
  
  int main()
  {
  int a=5,b=6;
  
  cout&lt;&lt;++a&lt;&lt;a++&lt;&lt;++a&lt;&lt;++a&lt;&lt;++a;
  
  return 0;
  
  }
  </code></pre>
  
  <p>My expected output should be 108876 but g++ compiler shows the output as 108101010</p>