Question: ers 717.1: Modify an array parameter Write a function SwapArrayEnds0 that swaps the first and last elements of the function's array parameter. Ex sortArray (10,20,
ers 717.1: Modify an array parameter Write a function SwapArrayEnds0 that swaps the first and last elements of the function's array parameter. Ex sortArray (10,20, 30, 40) becomes (40,20,30, 10). The array's size may differ from 4. Finclude ctostream using nanespace std 4Your solution goes here int mainO f 7 const int SORT ARR SIZE 4; 8 int sortArray[SORT ARR SIZE]; 9 intt 11 sortArraytej-1: 12 sortArray[]-20; 13 sortArray[ ; 14 sortArrayD3)-4 15 16 SwapArrayEnds(sortArray, SORT ARR SIZE) 17 18 for 1SORT ARR SIZE + Run Feedback? MacBook Air PIl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
