title: How to modify only a certain part of a 2D array through a function?
body: <p>I have a function which performs a transpose:</p>
  
  <pre><code>transpose (int ** array, int arr_size){
  for (i=0; i&lt;arr_size; i++) {
      for (j=i+1; j&lt;arr_size; j++) {
          temp=array[j][i];
          array[j][i]=array[i][j];
          array[i][j] = temp;
          }
      }
  }
  </code></pre>
  
  <p>I'm trying to get it to transpose only a certain sub-array out of my array, so if my array is:</p>
  
  <pre><code>1 2 3
  4 5 6
  7 8 9
  </code></pre>
  
  <p>and I pass in a double pointer to the element '5' and arr_size = 2, I should end up with</p>
  
  <pre><code>1 2 3
  4 5 8
  7 6 9
  </code></pre>
  
  <p>I tried passing in &amp;arr[1][1], but that does not work, since that is a single pointer, not a double pointer. arr_size is decided dynamically. </p>