Question: Write a function named getArray which passes the number of entries that the function will create and load. The function must return the address of
Write a function named getArray which passes the number of entries that the function will create and load. The function must return the address of the array to the calling program. The function will dynamically allocate the array to contain the number of elements that had been passed. Then through a loop prompt the user to enter the values one at a time and place the values into the array. Do not use subscripts to reference the array elements, use pointer notation instead.
Next write the code that would appear in main that will call the function to create the array. Then include the statement that will release the memory of the array. cplease
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
