Question: HW18: Pointers Here's an assignment that'll give you some practice with pointers. All you have to do is write a program that allows the user

 HW18: Pointers Here's an assignment that'll give you some practice with

HW18: Pointers Here's an assignment that'll give you some practice with pointers. All you have to do is write a program that allows the user to populate an array of doubles (5 values) by calling the function InitArray. After the user has entered all the values, then call the function DispRevArray to display the array in reverse. Main will create and allocate space for an array of type double for 5 elements Then you will create and allocate a pointer that will point to the array. You will display the address of the array, the address of what the pointer is pointing to, and the address of the pointer. Then main will call the functions InitArray and DispRevArray passing as arguments the pointer and the number of elements in the array. InitArray will take as argument a pointer to an array of type double and the number of elements in the array and have a void return type. It will prompt the user to enter 5 values and initialize the array via the pointer passed as an argument. DispRevArray will take as argument a pointer to an array of type double and the number of elements in the array and have a void return type. It will display the contents of the array, via using the pointer, in reverse. It will display them using a 1-digit significance. You can save your code in a file named pointers.cpp in your Hw18 directory Note that you won't need to use multiple modules, just one implementation file. Here's a sample run: 11:23 AM 11/12/2018

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!