qsort() can’t understand the detail in C

Why when we use qsort(), int(*compar)(const void*,const void*) haven’t add any paraments in, but can also do their functions?

Such as this :

double vals[NUM];
qsort(vals,NUM,sizeof(double),mycomp);


Source: c#

Leave a Reply