Question
Note: use global variables. Only use function variables. Write a program with the following: 1a. (), a function which accepts an array parameter and expands
Note: use global variables. Only use function variables. Write a program with the following:
1a. (), a function which accepts an array parameter and expands the array by 50%. The function deallocates any old dynamic memory and returns the newly created array. i.e. = 1.5
1b. , a function which accepts an array parameter and returns the largest element in the array.
1c. , a function which accepts an array parameter and returns the average of all elements.
1d. , performs the following: a. Create a dynamic array of size 5 and type double b. Prompt the user to enter values into the array. The prompt should continue until a negative number is entered c. During the entry process, if the array is filled, expand the array by calling the () function d. Display the maximum value in the array by calling () e. Display the average values in the array by calling ()
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