Write a function that determines the maximum and minimum values from a one-dimensional array. Assume that the corresponding func
tion prototype statement is void ranges(int x[], int npts, int *max_ptr, int *min_ptr) where npts contain the number of values in array x, and max_ptr and min_ptr are pointers to the variables in which to store the maximum and minimum values in the array.