How are arrays allocated?
<p>Noob here and I have 2 questions.</p>

<p>1) When creating an array like this int a[10], how does the system setup memory for the array? i.e. Does the system allocate ten 1-word memory contiguously (in heap?). What about char a[10]? or user defined type? </p>

<p>2) What about dynamic allocation? Such as int *a = new int[10]; How is this array setup in memory? (similar questions to question 1).</p>
