title: Behaviour of postfix and prefix
body: <p>I thought I understand how postfix and prefix works until I encounter this</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main(int argc, char const *argv[]) {
      int a = 3, b = 3, c = 3;
      cout &lt;&lt; a + a++ &lt;&lt; endl; // = 7 Okay, makes sense to me
      cout &lt;&lt; b + c++ &lt;&lt; endl; // = 6 Now I'm confused
  
      int x = 3, y = 3;
      cout &lt;&lt; (x++)*(x++)*(x++) &lt;&lt; endl; // = 3*4*5 = 60 Okay I get it
      cout &lt;&lt; (++y)*(++y)*(++y) &lt;&lt; endl; // = 5*5*6 = 150 Wait what ? But why... ?
                                         // I thought it would be 4*5*6 or 6*6*6 or something
  
      return 0;
  }
  </code></pre>
  
  <p>Is there any logical explaination for this ? Or it's some kind of undefined behaviour ?</p>