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

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!