Next: String Manipulation Up: C Standard Library Functions Previous: Process Control

Searching and Sorting

#include <stdlib.h>

void *bsearch(void *key, void *base, size_t num, size_t width, int (*compare)(void *elem1, void *elem2)) - Perform binary search.

void qsort(void *base, size_t num, size_t width, int (*compare)(void *elem1, void *elem2)) - Use the quicksort algorithm to sort an array.


Dave.Marshall@cm.cf.ac.uk
Wed Sep 14 10:06:31 BST 1994