title: C++ negative array index
body: <p>I alloced an int array of 3 elements, and thought of this code below:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>int a[3];
  for(int i = -2; i &lt; 3; ++i){
      a[i] = i; 
      cout&lt;&lt;a[i]&lt;&lt;" ";
  }
  </code></pre>
  
  <p>Here's its output:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>-2 -1 0 1 2 
  </code></pre>
  
  <p>It seems like array a has 5 alloced space, and a is at the middle of those space.
  Any ideas?</p>