To sort I call qsort(myArray,100,sizeof(int), comp)
qsort(myArray,100,sizeof(int), comp)
int comp(const int * a, const int * b) if(a==b) { return 0; } else { if(a
Your comparator is broken. You are comparing the pointer values rather than the values being pointed to. Add the * dereference operator to the a and b comparisons and it should work.
*
a
b