If I have a function which calculates the minimum and maximum of an array would it be bad practice to include minimum and maximum in the function parameters so I can edit them while the function runs.
So I would have void minmax(array, int min, int max)
the min and max variables would be sent in as null and get changed when the function runs. Would this be ok or should I be using malloc to get an array and return the pointer instead?