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
You need to compare the values, not their addresses. Try
int comp(const int * a, const int * b) { return *a - *b; }
To reverse the ordering, use
int comp(const int * a, const int * b) { return *b - *a; }