void qsort (void* base, size_t num, size_t size, int (*compar)(const void*,const void*));
void*
.
|
|
return value | meaning |
---|---|
<0 | The element pointed to by p1 goes before the element pointed to by p2 |
0 | The element pointed to by p1 is equivalent to the element pointed to by p2 |
>0 | The element pointed to by p1 goes after the element pointed to by p2 |
|
|
|
|
10 20 25 40 90 100 |
num*log2(num)
times.num*size
bytes, or if comp does not behave as described above, it causes undefined behavior.