Write a function that reverses the elements of an array so that the last element becomes the first, the second from the last becomes the second, and so forth. The function is to reverse the elements in place—that is, without using another array. ( It is permissible to use a variable to hold an element temporarily.) Then write a test driver to test your function. Test it twice, once with an even number of elements in the array and once with an odd number of elements in the array.
Write a function that reverses the elements of an array
Keep reading
Short on time? Let an expert help.
Original papers written to your instructions, on time, from $10/page.
Order now