Question: In C language, Suppose we have the following function that takes two arrays of integers and combines them into a single dynamically allocated array and
In C language,

Suppose we have the following function that takes two arrays of integers and combines them into a single dynamically allocated array and returns that array. Write complete test code to test this function. You do not have to write this function, just its test code. //Purpose: Add contents of two dynamically allocated arrays //Parameters: // iPtrl - pointer to an integer array // iPtr2 - pointer to a second integer array // iSizel - the number of integers in the first array // iSize2 - the number of integers in the second array //Returns: // A dynamically allocated array containing the contents of the passed in arrays. int * addIntArrays(int* iPtri, int* iptr2, int iSizel, int iSize2) . Requirements Dynamically allocate the test arrays to be passed in. Add data to both arrays. Call the function addIntArrays Print out the elements in the returned array. Anything else that you think is required. void testAdd IntArrays() { }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
