Question: C++ Write a function that takes as input parameters a length parameter (an int), and an int parameter that will be modified using pass by
C++
Write a function that takes as input parameters a length parameter (an int), and an int parameter that will be modified using pass by reference. When the function is called the second parameter is initialized to -1 (before the function call). The function should should generate a random array the length of the length parameter, with the numbers between 1 and 50. The function should print the array, and then locate the smallest value in the array, modifying the third parameter to be the smallest value. Make sure you print this value after youve returned from the function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
