Synopsis
#include <stdlib.h>
void qsort(const void *base, size_t num, size_t size, int (*compare)(const void *, const void *));
Description

qsort sorts the array *base using the compare algorithm. The array should have num elements of size bytes. The compare function should return a negative value if the first parameter is less than second parameter, zero if the parameters are equal and a positive value if the first parameter is greater than the second parameter.

Portability

qsort conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).