Question: LAB ACTIVITY 1 4 . 2 0 Arrays and Pointers Write a C + + program that uses a method called shiftRight that takes in
LAB
ACTIVITY Arrays and Pointers
Write a C program that uses a method called shiftRight that takes in an int pointer to an array as a parameter. It should shift all the
elements of the array to the right and the last elements should be wrapped around and go to first.
Use pointer arithmetic to traverse the array inside the method and use array notation to print out the resulting
array in the main program.
Add another function called reverse that takes an int pointer to an array as a parameter. It should reverse elements of the array.
This function uses array notation to traverse the array and pointer notation to print the results in the main program
You may declare and use helper arrays inside the functions.
The UI will be like this:
Your output
The Original Array
The Reversed Array
The Shifted Array
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
