Answer:
Replace /* Your solution goes here*/ with the following
void SwapArrayEnds(int sortArray [], int lent){
int temp = sortArray[0];
sortArray[0] = sortArray[lent-1];
sortArray[lent-1] = temp;
}
Explanation:
This defines the function SwapArrayEnds with two parameter (the array and the array length)
void SwapArrayEnds(int sortArray [], int lent){
This declares an integer variable "temp" and initializes it with the first element of the array
int temp = sortArray[0];
The next two lines swap the last element with the first
sortArray[0] = sortArray[lent-1];
sortArray[lent-1] = temp;
}
See attachment for full program