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.
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.
12 freelances font une offre moyenne de 13 $ pour ce travail
Hello,I will do simplest coding in C++,C using OOP,data structures [login to view URL] it is an assignment then coding will be easily understandable for u.I have done many C++ works [login to view URL] have a chat. Thanks.
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
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 Plus
Hi Thank you for posting me. I am an algorithm expert. I took part in acm contest. I can finish your task in a few hours. thank you.
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
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.
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)
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 Plus
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 Plus
Hi, I can do that, that's super easy, Consider it done, just email me and get your answer. I'm a second year university student in Computer Science and I've been learning and practicing C++ for 4 years. I've made a ful Plus
hey I am expert in that and luckily I have already done this a few months back just give me an opportunity and see [login to view URL] for your reply.