title: c sorting with recursion
body: <p>I'm trying to write a sorting function with just recursion. I keep getting the error:</p>
  
  <pre><code>lvalue required as unary '&amp;' operand
  </code></pre>
  
  <p>This are the functions I'm using:</p>
  
  <pre><code>void sorter_rec (int a[], int n) {
      if (n ==1 ) return;
      else {
          swap( &amp;(maximumrec(a,n)), &amp;a[n-1]);
          sorter_rec(a,n-1);
          return;
      };
  }
  </code></pre>
  
  <p>The error is in sorter_rec.</p>
  
  <pre><code>void swap(int *px, int *py)
  {  int z = *px;
     *px = *py;
     *py = z;
     return;
  }
  
  int maximumrec(int ar[], int n)
  {
  
      if (n == 1) {
          return ar[0];
  
      } else {
          int max = maximumrec(ar, n-1);
          return ar[n-1] &gt; max ? ar[n-1] : max;
      }
  }
  </code></pre>
  
  <p>How can I solve this?</p>