bsearch的问题
#include <stdio.h>#include <stdlib.h>
int cmp(const void *a,const void *b)
{
return *(int *)a-*(int *)b;
}
int main()
{
int array[]={1,2,3,4,5,6,7,5,8,9};
int c,a=6;
int *m;
m=&c;
m=(int *)bsearch(&a,array,9,4,cmp);
printf("%d",c);
return 0;
}