Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

00 etisalat 12:31 AM 34% EO HW1 Write a C+ program that creates a dynamic 1D array. Prompt the use for the size of the

image text in transcribed
image text in transcribed
00 etisalat 12:31 AM 34% EO HW1 Write a C+ program that creates a dynamic 1D array. Prompt the use for the size of the array and fill it in with values. You are also asked to implement the following 3 functions: double addValue (double* arr in, int& size, double newValue); This functions creates a new array with size+1, copies old array values and append the new value entered by the user. The new array is then returned to the main function double* deleteValue (double* arr in, int& size, double deleteValue); This function creates a new array with size-1, copies old array values except for the value to be deleted (delete Value). You can assume that the array contains unique value. Also note that if "delete Value" does not exist in the original array then the function will simply return the original array as is. void printArr (double arr_in, int size) This function prints out the value of an array Here is an example main function (incomplete): void main () int size; double* arr_in; //read size and create array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

8-2 What is the business value of security and control?

Answered: 1 week ago

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago