Question: 1. [24 points] Create two dynamic arrays A and B with random numbers. a) Merge B in array A calling a function by reference. b)
![1. [24 points] Create two dynamic arrays A and B with](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f32df991ad5_04966f32df924e62.jpg)
1. [24 points] Create two dynamic arrays A and B with random numbers. a) Merge B in array A calling a function by reference. b) Delete the Prime numbers from the merged array A calling a function by pointer. c) Print the Array A in ascending order. You have to use only two Arrays A and B throughout the code. Be careful about memory leakage. Example: A= [20, 30, 5, 7, 19) B= [19, 10, 15, 11, 17, 25) a) After merging B in A, the merged Array A will look like- A= [20, 30, 5, 7, 19, 19, 10, 15, 11, 17, 25) b) After deleting prime numbers the merged Array would look like- A= [20, 30, 10, 15, 25) c) Finally print the merged array in ascending order A= [10, 15, 20, 30, 25)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
