Question: Write a program that : a. Creates a dynamically allocated array of size 2 b. Stores values inputted by the user into the array until

Write a program that :

a. Creates a dynamically allocated array of size 2

b. Stores values inputted by the user into the array until a sentinel value is reached

c. Resizes the array to currentSize x 2 when necessary

d. Creates a second array AFTER the sentinel is reached that stores all the values in the first array, but in reverse order

e. Displays the contents of both arrays

f. Your program should use at LEAST 2 functions to accomplish the above tasks.

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!