Question: What is the prinout of the following program? #include using namespace std; int m ( int list [ ] , int numberOfElements ) { int

What is the prinout of the following program?
#include
using namespace std;
int m(int list[], int numberOfElements)
{
int v = list[0];
for (int i =1; i < numberOfElements; i++)
if (v < list[i])
v = list[i];
return v;
}
int main()
{
int values[2][4]={{3,4,5,1},{33,6,1,2}};
for (int row =0; row <2; row++)
{
cout << m(values[row],4)<<"";
}
return 0;
}
Group of answer choices
335
56
533
11
333

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 Programming Questions!