Who Programs Short Sorts?
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
If we were to give you an array of integers in C and tell you to sort the array, you could probably do it, however, since arrays "devolve" to pointers when in the context of a function, there is the glaring problem of knowing how long the array is that we care to sort. This is why when arrays are handed into functions in C, they are often accompanied with a variable specifying the length of the array. Without this, the function may have no idea how long the array is.
Write a function called array_sort that takes in an integer array scores of length array_len and which you must sort with the lowest values (including negatives) at the lowest indices