title: Pointers equivalent to Arrays
body: <p>I know that If i define an array like</p>
  
  <pre><code>int a [10];
  </code></pre>
  
  <p>I can use a pointer notation, to access it's address using <code>a+&lt;corresponding_item_in_array&gt;</code>
  and it's value using, <code>*(a+&lt;corresponding_item_in_array&gt;)</code> .</p>
  
  <p>Now I wanted to reverse things, I used <code>malloc</code> to allocate a memory to a integer pointer, and tried to represent the pointer in subscript notation but it didn't work</p>
  
  <pre><code>int *output_array;
  output_array = (int *) (malloc(2*2*2*sizeof(int))); //i.e, space for 3d array
  
  output_array[0][0][1] = 25;  
  // ^ produces error: subscripted value is neither array nor pointer
  </code></pre>
  
  <p>I may have used an pointer expression using Storage Mapping, but ain't the simpler method available? and Why?</p>