Query: qsort
OS: osf1
Section: 3
Links: osf1 man pages all man pages
Forums: unix linux community forum categories
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
qsort(3) Library Functions Manual qsort(3)NAMEqsort - Sorts a table in placeLIBRARYStandard C Library (libc.so, libc.a)SYNOPSIS#include <stdlib.h> void qsort( void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *));STANDARDSInterfaces 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.PARAMETERSPoints 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.DESCRIPTIONThe 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).NOTESThe 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.RELATED INFORMATIONFunctions: bsearch(3), lsearch(3) Standards: standards(5) delim off qsort(3)
Related Man Pages |
---|
qsort(3) - debian |
qsort(3) - centos |
bsearch(3) - ultrix |
qsort(3c) - hpux |
bsearch(3) - osf1 |
Similar Topics in the Unix Linux Community |
---|
file comparison |
Sequential comparison (one row with file and so on) |
Points to compare Linux distros |
Array elements comparison using perl |
File comparison in UNIX columnwise |