Question: Using the C++ language to write the following. Write a function called getNums which first asks the user how many floating point numbers the user

Using the C++ language to write the following.

Write a function called "getNums" which first asks the user how many floating point numbers the user intends to enter. It then allocates an array to hold the numbers (only the number of entries needed) using the "new" keyword and finally, prompts for these numbers and loads them into the dynamically allocated array.

Show the code necessary to deallocate the space allocated in the function "getNums" above.

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!