title: Sorting an array of double in C
body: <p>I'm trying to sort an array of type double in C but I am not getting the expected output. It appears to be sorting the memory addresses instead of the actual values. I have tried changing the vairables to (*grade[i]) but then I get a "invalid type argument of unary *" error. Here is the snipit of code in question. </p>
  
  <pre><code>void sortGrade(double grade[], int n){
  int i, j, swapped;
  double temp;
  for (i = 0; i &lt; n; ++i)
  {
      for (j = i + 1; j &lt; n; ++j)
      {
          if (grade[i] &lt; grade[j])
          {
              temp = grade[i];
              grade[i] = grade[j];
              grade[j] = temp;
          }//end if
      }//end inner for
  }//end outer for
  printf("After sort:\nGrade\n");
  for (i = 0; i &lt; n; ++i)
  {
      printf("%d\n", grade[i]);
  }//end for
  }//end sortGrade
  </code></pre>
  
  <p>Any help would be greatly appreciated. 
  Full disclosure, this is for school, but the assignment has already been submitted, now I'm just trying to figure out how to actually make it work.</p>