Pointer array question
<pre><code>int test[3] = {1,2,3};
cout&lt;&lt;test[3]&lt;&lt;endl;    
// this will get a error
</code></pre>

<p>but </p>

<pre><code>int test[3] = {1,2,3};
int (*A)[3];
A = &amp;test;
cout&lt;&lt;test[3]&lt;&lt;(*A)[3]&lt;&lt;endl;  
// this will print -858993460 withiout any errors
</code></pre>

<p>So could anyone tell me why? i am really confused by that.</p>

<p>in the first case why it is not outofboundary error but an undefined error?
and why the second case will not get a error? i used to think they are the same...</p>

<p>actually i did know the array start from 0, i am confused by why the first got an error but  the second won't????</p>
