i need help with my question -- 4

Closed Posted 3 years ago Paid on delivery
Closed Paid on delivery

Write a function that accepts an int array and the array’s size as arguments.

The function should create a new array that is twice the size of the argument array.

The function should copy the contents of the argument array to the new array, and initialize the unused elements of the second array with 0.

The function should return a pointer to the new array.

Additional Requirements:

Demonstrate your function in a program by initializing an array in main and passing it and it's size to your function. Use the pointer returned by your function to print the contents of the array in main. Don't forget to delete the array at the end of main using the pointer.

Your function should not interact with the user in any way (no cin or cout statements).

Do not use global variables.

Your function must use dynamic memory allocation to create the array. If it does not, you will receive 0 points for the assignment.

Do not use smart pointers.

C++ Programming

Project ID: #27902879

About the project

9 proposals Remote project Active 3 years ago

9 freelancers are bidding on average $10 for this job

anandkumarcb2014

I have 15+ years of experince in C and C++ programming and have handled multiple projects in similar field. I can help you with your work. Please ping me more details so we can work on this

$10 USD in 7 days
(5 Reviews)
3.7
tejat91

Hi, I'm an expert C++ developer and have hands-on experience working on various data structure/algorithm projects. Let me know further details. Regards, Teja

$10 USD in 1 day
(1 Review)
2.1
ahmedbilal2506

Hi sir I am interested to work with you. I can provide you professional web design services. I can design for you according to your requirements. I will give you unlimited revision until you will not satisfy for your d More

$10 USD in 1 day
(1 Review)
1.4
az889480

Hi, Dude luckly I have the cpp file that contains the code of this project. I can send it to you withen 2 hours. Believe me withen two hours.

$10 USD in 1 day
(0 Reviews)
0.0
NichitaDolinschi

Hello ready to take on your job, I have been working with C ++ for 3 years, so your task will be very simple for me)

$10 USD in 2 days
(0 Reviews)
0.0
shehzadhassan112

Hi respected Sir, I hope you are enjoying good health. We are a team of C++ developers . We will create a function for you That Accepts the size and array elements as input and creates another array of double size. We More

$10 USD in 1 day
(0 Reviews)
0.0
b3jn

Hello, i am looking for project to start my freelance career. I have a lot of experience working with C and C++ languages, and think that we can do this really easy. Mainly doing this for reviews, so the payment is opt More

$10 USD in 1 day
(0 Reviews)
0.0