/* A simple test of qsort.  */
#include <stdlib.h>
#include <stdio.h>

#define NBR_NUMBERS 1024

int data_vals[NBR_NUMBERS];

int
int_compare (const void *a, const void *b)
{
  return *(int *)a > *(int *)b;
}

int
main(void)
{
  int i;

  for (i = 0; i < NBR_NUMBERS; i++)
    data_vals[i] = rand ();

  qsort (data_vals, NBR_NUMBERS, sizeof (int), int_compare);

  for (i = 0; i < NBR_NUMBERS; i++)
    printf ("%d\t", data_vals[i]);
  printf ("\n");
  return 0;
}
