title: Pointers and references to 'char buffer[128]'
body: <p>I have a simple program:</p>
  
  <pre><code>char buffer[128];                      // creates an array of 128 elements
  memset(&amp;buffer, 65, sizeof(buffer));   // fills buffer with 'A' (ascii 65) letter
  cout &lt;&lt; buffer &lt;&lt; endl;                // prints whole buffer - 128 times 'A' letter
  cout &lt;&lt; &amp;buffer &lt;&lt; endl;               // prints adress of a buffer (first element of it)
  cout &lt;&lt; buffer[0] &lt;&lt; endl;             // prints first element of a buffer
  </code></pre>
  
  <p>until now everything works great, but I can't understand why, when I call this:</p>
  
  <pre><code>cout &lt;&lt; &amp;buffer[0] &lt;&lt; endl;          
  </code></pre>
  
  <p>imho above code should print address of a first element in buffer (the same as <code>&amp;buffer</code>), but it prints whole buffer, just like <code>cout &lt;&lt; buffer &lt;&lt; endl;</code></p>
  
  <p>why is that happens?</p>