Question: Write a C + + program to create 2 arrays below: int array 1 [ ] = { 1 , 2 , 3 , 4
Write a C program to create arrays below:
int array;
int size sizeofarray sizeofint;
int array;
int size sizeofarray sizeofint;
Then write a function that takes two pointers to the above arrays and their sizes as arguments. The function should return a pointer to a new array that contains the combination of the elements of the two input arrays. The function should also modify the size argument to be the size of the new array. Use below function prototype:
int unionArraysint array int size int array int size int& size
To remove the duplicate, you may use Boolean data type declaration below:
bool isDuplicate false;
Sample IO format of the program is as shown below:
New array:
Size of the new array:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
