Question: Please write the program with c++ language , and provide a output example, print everything in the main not inside any function Write a program

Please write the program with c++ language, and provide a output example, print everything in the main not inside any function

Write a program that declares an integer array of size 8 using dynamic memory allocation. Then, the program keeps asking for numbers from the user to put inside the array until a negative number is entered.

If the user enters more than 8 numbers, the program MUST increase the size of the array ONE BY ONE using realloc method. Finally, the program will write all the numbers inside the array

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!