I am using this compare function to sort an array consisting of long long int nos.
int compare(const void * p1,const void * p2)
{
return (* (long long int * )a-*(long long int * )b);
}
qsort(array,no of elements,sizeof(long long int),compare)
this works fine for small nos but when the array contains nos of the oreder of 10^10 it gives wrong results?
what is the mistake i am making?