Question: Would appreciate help with this task on my C++ programming course. Programming task 5.4: Join Arrays (20 pts) In this exercise, practice memory handling and

 Would appreciate help with this task on my C++ programming course.

Would appreciate help with this task on my C++ programming course.

Programming task 5.4: Join Arrays (20 pts) In this exercise, practice memory handling and then dynamic memory allocation Implement the function join_arrays that gets three integer arrays and size of the three arrays as its arguments. The six function arguments should be in this order: number of integers in the first array (as unsigned integer) pointer to first array of integers number of integers in the second array (as unsigned integer) pointer to second array of integers number of integers in the third array (as unsigned integer) pointer to third array of integers The function should join the three arrays into a single array that contains all integers from the original arrays in the above order. The new array should be allocated dynamically, and the function should return the pointer to the created array. You must not modify the original arrays. Here's an example main - function, which can be used to test your program: int main(void) /* testing exercise. Feel free to modify */ int al[] { 1, 2, 3, 4, 5 }; int a2 [] { 10, 11, 12, 13, 14, 15, 16, 17 }; int a3 [] { 20, 21, 22 }; int *joined = join_arrays (5, al, 8, a2, 3, a3); for (int i = 0; i

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!