>>quicksort(array, s);
You don't want to sort the whole array, only the elements that have real data in them, so use:
>>quicksort(array, i);
Change this bit:
Code:
while(array != NULL){ //Puts the numbers back into a new file
for(n=0; n <101; n++){
fprintf(quick, "%d\n", array[n]);
}
}
to this (note, no "while" loop needed)
Code:
for (n = 0; n < i; n++)
{
fprintf(quick, "%d\n", array[n]);
}
Change this
>>for(b=a=1;b<size;b++){
to this
for (b = a; b < size; b++)
See how you go, that may not be all necessary changes, but it should get you moving.