I want to use qsort() to sort array a with respect to b. Can you give me the function?
a={0,1,2,3,4} b={3,4,5,1,2}
answer must be {3,4,0,1,2}
Please give me the code of function.
like :
int compare (const void *a,const void *b)
{
return(*(char *)a-*(char *)b);
}