Question: C++ Pointers. Write a program that uses a function called Output_Array_Info. Output_Array_Info Properties: Input Parameters: 1. A pointer to an integer called array_ptr. This will

C++ Pointers.

Write a program that uses a function called Output_Array_Info.

Output_Array_Info Properties:

Input Parameters:

1. A pointer to an integer called array_ptr. This will be used to point to an array of integers.

2. An integer that stores the size of the array.

Steps Taken inside of the Output_Array_Info function:

1. Output every integer value for the array that array_ptr is pointing to. Use the pointer to do this. Do not use brackets ([]), to output the integer values.

2. Output every memory address location for the array that array_ptr is pointing to. Use the pointer to output this as well.

The main function will perform the following steps

: 1. Declare an array of 5 integers called numbers.

2. Declare a pointer to an integer called pointer.

3. Have pointer point to the numbers array.

4. Pass pointer and the size of the array as parameters to the Output_Array_Info function.

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!