1#include <stdlib.h>
2int cmpfunc (const void * a, const void * b) {
3 return ( *(int*)a - *(int*)b );
4}
5
6int main () {
7//n is number of elements in arr(size f that arr)
8 qsort(arr, n, sizeof(int), cmpfunc);
9 }
1void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*))