Question: Write a C++ main program that calls each function listed below. Load values into each array using a list to test each function. Print out

 Write a C++ main program that calls each function listed below.

Write a C++ main program that calls each function listed below. Load values into each array using a list to test each function. Print out results to show original array contents and contents after using the functions. All printing should be done in the main programs - do not print from the functions. Turn in copies of the program and all results. Output: The output should clearly show original array contents, new array contents (if modified), and the result. For example, the output for part B might look as follows: Contents of array A before swap: 1 2 3 4 5 6 7 Contents of array B before swap: 8 9 10 11 12 13 14 Contents of array A after swap: 8 9 10 11 12 13 14 Contents of array B after swap: 1 2 3 5 6 7 A) Include a function to find the length of a vector stored in an array where the length of an N-dimensional vector L is: Length = Squareroot (L_0)^2 + (L_1)^2 + (L_1)^2 + ... (L_N - 1)^2 Form of function call: Result = Length(A, Size) B) Include a function to swap the contents of two equal size arrays named A and B. Form of function call: Swap(A, B, Size) C) Include a function to reverse the contents of an array. For example, an array that originally contained the elements 1, 2, 3, 4 would contain 4, 3, 2, 1 after the function call. Form of function call: Reverse (A, Size)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!