Answers for "does The qsort library function takes the address of each element of the array to be sorted as an argument"

C
2

qsort in c

#include <stdlib.h>
int cmpfunc (const void * a, const void * b) {
   return ( *(int*)a - *(int*)b );
}

int main () {
//n is number of elements in arr(size f that arr)
   qsort(arr, n, sizeof(int), cmpfunc);
   }
Posted by: Guest on August-13-2020

Code answers related to "does The qsort library function takes the address of each element of the array to be sorted as an argument"

Code answers related to "C"

Browse Popular Code Answers by Language