title: Called a function with "cout" statement inside a "cout" statement
body: <p>I came across this rather vague behavior when messing around with code , here's the example :</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  
  int print(void);
  
  int main(void)
  {
      cout &lt;&lt; "The Lucky " &lt;&lt; print() &lt;&lt; endl;     //This line
      return 0;
  }
  
  int print(void)
  {
      cout &lt;&lt; "No : ";
      return 3;
  }
  </code></pre>
  
  <p>In my code, the statement with comment <code>//This line</code>is supposed to print out 
  <code>The Lucky No : 3</code>, but instead it was printed <code>No : The Lucky 3</code>. What causes this behavior? Does this have to do with C++ standard or its behavior vary from one compiler to another?</p>