www.delorie.com/gnu/docs/glibc/libc_140.html   search  
Buy the book!

The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Searching and Sorting

This chapter describes functions for searching and sorting arrays of arbitrary objects. You pass the appropriate comparison function to be applied as an argument, along with the size of the objects in the array and the total number of elements.

9.1 Defining the Comparison Function  Defining how to compare two objects. Since the sort and search facilities are general, you have to specify the ordering.
9.2 Array Search Function  The bsearch function.
9.3 Array Sort Function  The qsort function.
9.4 Searching and Sorting Example  An example program.
9.5 The hsearch function.  
9.6 The tsearch function.  

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003