Create another function that also accepts the array as its


Write a program that does the following:

  1. In your main function create an int array of 5 elements, e.g.: { 3, 4, 10, 8, 21 }
  2. Create a function that can accept the array as parameter. This function reverses the given array elements. After function finishes execution, using above example array, elements should look like { 21, 8, 10, 4, 3 }. Call this function from main,
  3. Create another function that also accepts the array as its parameter. This functions prints all the elements in the array. Call this function from the main after the previous function call.

Note: Arrays are always passed by reference, as such both first and the second function doesn't need to return anything (i.e. it should be of void type).

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Create another function that also accepts the array as its
Reference No:- TGS0646096

Expected delivery within 24 Hours