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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started