I want to know how this function is working. I used qsort() function to sort the integers in an array and i found this compare() function on internet. It worked perfectly well but i cannot understand how is it working and what's its logic. Any help?
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}