*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> qsort (3)              



NAME    [Toc]    [Back]

       qsort - Sort a table in place

SYNOPSIS    [Toc]    [Back]

       #include <stdlib.h>

       void qsort(
               void *base,
               size_t nmemb,
               size_t size,
               int (*compar)(const void *, const void *) );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       qsort():  XPG4, XPG4-UNIX

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Points  to  the  first  entry in the table.  Specifies the
       number of entries in the table.   Specifies  the  size  in
       bytes  of  each table entry.  Points to the user-specified
       function to be used to compare pairs  of  table  elements.
       The comparison function will be called with two parameters
       that point to the two elements to be compared.   The  comparison
  function  must return an integer less than, equal
       to, or greater than zero, depending on whether  the  first
       element  in  the comparison is considered less than, equal
       to, or greater than the second element.

DESCRIPTION    [Toc]    [Back]

       The qsort() function sorts a table having a specified number
  of  entries.  The contents of the table are sorted in
       ascending order according to a  user-specified  comparison
       function (the strcmp() function, for example).

NOTES    [Toc]    [Back]

       The  comparison  function  need not compare every byte, so
       arbitrary data may be contained in the elements  in  addition
 to the values being compared.

       When  two members compare equal, their order in the sorted
       array is indeterminate.

SEE ALSO    [Toc]    [Back]

       Functions: bsearch(3) lsearch(3)

       Standards: standards(5)

[ Back ]
 Similar pages
Name OS Title
glpassthrough IRIX place a marker in the feedback buffer
gzexe Linux compress executable files in place
gzexe FreeBSD compress executable files in place
DtEditorSetContents HP-UX place data into a DtEditor widget
gzexe IRIX compress executable files in place
glPassThrough Tru64 place a marker in the feedback buffer
vc HP-UX substitutes assigned values in place of identification keywords.
VkPrefEmpty IRIX Empty place holder for preference package (decorative)
ttsyncd HP-UX Daemon to maintain the nis+ password table in sync with the nis+ trusted table.
sradixsort OpenBSD radix sort
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service