title: 2D array manipulation using a pointer in C
body: <p>Let us say I have a function which manipulates a 2D array which receives a pointer to the 2D array from the main function as its parameter.</p>
  
  <p>Now, I want to modify(assume add 10 to each element) each element of the 2D array.</p>
  
  <p>I am interested in knowing about traversing through the 2D array with a single pointer given to me and return the pointer of the newly modified array.</p>
  
  <h3>Rough Structure</h3>
  
  <p>Assume pointer <code>a</code> contains the initial address of the 2D array.</p>
  
  <pre><code>int add_10(int *a)
  {
      int i, j,
          b[M][N] = {0};
  
      for(i = 0; i &lt; M; i++)
          for(j = 0; j &lt; N; j++)
              b[i][j] = 10 + a[i][j];
  }
  </code></pre>