qsort

Name

qsort -- sorts elements in an array

Synopsis

#include <stdlib.h>

void qsort(void * base, size_t nelem, size_t size);

Description

This function takes a pointer to an array in RAM and sorts it.

base points to the memory to be sorted.

nelem is the number of elements to sort.

size is the size of each element.

Examples

Using qsort()