title: Why is this code involving arrays and pointers behaving as it does?
body: <p>I was asked what the output of the following code is:</p>
  <pre><code>int a[5] = { 1, 3, 5, 7, 9 };
  int *p = (int *)(&amp;a + 1);
  printf(&quot;%d, %d&quot;, *(a + 1), *(p - 1));
  </code></pre>
  <ol>
  <li><code>3, 9</code></li>
  <li>Error</li>
  <li><code>3, 1</code></li>
  <li><code>2, 1</code></li>
  </ol>
  <p>The answer is NO.1</p>
  <hr />
  <p>It is easy to get <code>*(a+1)</code> is 3.</p>
  <p>But how about <code>int *p = (int *)(&amp;a + 1);</code> and <code>*(p - 1)</code> ?</p>