Hey everyone,

I'm a program newbie, I'm writing a code for sorting numbers from a input file,

basically, I ask user to type in the file name, open file, read it, pass to a array, then sort it


qsort(array, array_size, sizeof(int), (*compare)(const void *, const void *));


since the array_size may vary for different file, I can't just use
int array_size= some #

How would I write this? Thank you very much!