title: why do we use pointer to 1-D array or multidimensional array
body: <p>Recently i was going through concepts pointers , encountered with pointer to an array.
  so my questions are:-</p>
  <ol>
  <li><p>why we use pointer to an array ,though we can use access content directly using array?</p>
  </li>
  <li><p>my second questions is related to following code.</p>
  </li>
  </ol>
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {    int *p; 
        
      int (*ptr)[5]; 
      int arr[5];
        
      p = arr;
        
      ptr = &amp;arr; 
        
      printf(&quot;p = %p, ptr = %p\n&quot;, p, ptr);
        
      p++; 
      ptr++;
        
      printf(&quot;p = %p, ptr = %p\n&quot;, p, ptr);
        
      return 0;
  }
  </code></pre>
  <p>I know (*ptr)(5) points to an array of size 5.so here what ptr++ points to, is it pointing to something that i haven't defined?</p>
  <hr />
  <ol start="3">
  <li>My last question is about pointer to multi dimensional array.
  somewhere i saw they used <em>(</em>(arr+i)+j) for dereferencing or accessing the value , why is that ?though we can write arr[i][j] in place of that and it is way more easy to write.</li>
  </ol>