In C++
Define a function
int * shuffle (int * p1, int len1, int * p2, int len2)
that “shuffles” the arrays where the first array has base addressp1 with length len1
and the second array has base address p2 with length len2.
The function should return a dynamically allocated array containingall the shuffled elements.
To shuffle, we start with element zero of p1, followed by elementzero of p2, followed by element one of p1 and so on
until the elements of (at least) one of the arrays areexhausted.
If there are still elements remaining to process from the otherarray, then we just tack them on at the
PayPal Gateway not configured
PayPal Gateway not configured