qsort:

int cmpfunc (const void * a, const void * b)
{
   return ( *(int*)- *(int*));
}

qsort(values, 5, sizeof(int), cmpfunc);