consider the below prototype is a function prototype which does bubble sorting
Code:
void bubble(int *a, int elements, int (*fptr) (const int *m, const int *n))
now consider there is a function which does the compating part
Code:
int comp(const int *m, const int *n)
so now i can use the function comp in the function bubble to sort the values.....but how to pass the parameters to the function comp..
for example the calling function is as below
Code:
int a[]={2,7,3,9,1,0};
bubble(a,6,comp) ;
Here i could not understand how to pass the parameters to the function comp....?