title: Swapping two pointers to pointers
body: <p>I have a function which takes a pointer to an array (so an <code>int**</code>). In this function, I'd like to call <code>swap(int*, int*)</code> to swap the location of two of the elements in the array. What is the syntax in C for swapping these two elements?</p>
  
  <p>Here's an example of what I'm looking for:</p>
  
  <pre><code>int* do_something(int** arr) {
      // assume i and j are valid locations in the array
      swap(&amp;arr[i], &amp;arr[j]); // what should this line be?
  }
  
  // this function works fine, no changes needed
  void swap(int* a, int* b) {
      int temp = *a;
      *a = *b;
      *b = temp;
  }
  </code></pre>