title: Why do we need a buffer when we get input from the user?
body: <p>Why do we need a buffer when we get input from the user?</p>
  
  <p>For example:</p>
  
  <pre><code>chat arr[10];
  cin&gt;&gt;arr;
  // or
  cin.get(arr,10);
  </code></pre>
  
  <p>I read that there is a temporary variable called buffer that stores the input that the user typed. So:</p>
  
  <ol>
  <li><p>Does the compiler use the buffer just in case of char array? If the answer is "no" then when does it get used?</p></li>
  <li><p>What is the reason that the compiler uses buffer in my example above?</p></li>
  <li><p>If the buffer in my example above is an array, how the compiler choose its size?</p></li>
  </ol>