Guardian C Library Calls Reference Manual

Reference to Library Calls
Guardian TNS C Library Calls Reference Manual128833 3-147
qsort
qsort
The qsort function sorts an array of elements in ascending order using a specified
comparison routine.
base
points to the first element in the array to sort.
nmemb
specifies the number of elements in the array.
size
specifies the size in bytes of the array elements.
compar(void *, void *)
points to a function that compares two elements of size size, returning an integer less
than, equal to, or greater than zero if its first argument is respectively less than,
equal to, or greater than its second.
Return Value
none.
#include <stdlibh>
void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *));