void qsort (void* base, size_t num, size_t size, int (*compar)(const void*,const void*));
void*
.
|
|
return value | meaning |
---|---|
<0 | The element pointed by p1 goes before the element pointed by p2 |
0 | The element pointed by p1 is equivalent to the element pointed by p2 |
>0 | The element pointed by p1 goes after the element pointed 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.