title: what is the cin operator order in C++
body: <p>I have a question about cin and cout order in C++, for example:</p>
  
  <pre><code>int a,b;
  std::string c;
  std::cin &gt;&gt; a &gt;&gt; b &gt;&gt; c &gt;&gt; c &gt;&gt; a;
  std::cout &lt;&lt; a &lt;&lt; " " &lt;&lt; b &lt;&lt; " " &lt;&lt; c &lt;&lt; " " &lt;&lt; a;
  </code></pre>
  
  <p>if the input is "5 10 hello world 15 20", what is the output,
  I can see the result, but can anyone explain me how it works?
  cin assign 5 variable, but input is 6 values, and what is the order of cin and cout?</p>