Question: Write a template function that will do the following: Given an array passed to the function, return a new array of random elements from the

Write a template function that will do the following: Given an array passed to the function, return a new array of random elements from the original

Take in 3 parameters: 1. A pointer to an array of some type 2. A variable indicating the size of the array 3. Another variable indicating how many elements are to be returned

Return a new array of size equal to the number specified by the 3rd parameter

Assume there exists a global function with the following prototype: //Return a number between min and max, inclusive int Random(int min, int max);

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!