The function sort_array does not exist. It has not been written.
This int sort_array(); declares the existence of a function named sort_array that takes no parameters and returns an int, and this int sort_array(int* nums); declares the existence of of a function named sort_array that takes an int pointer and returns an int.
Nowhere in this code are these functions actually defined. I suspect you've kind of tried to define the function right at the start of the main function. This is wrong. You cannot define a function inside another function.