Question: What will be displayed by the following code? #include using namespace std; int ttt ( int m [ ] [ 2 ] ) { int

What will be displayed by the following code?
#include
using namespace std;
int ttt(int m[][2])
{
int v = m[0][0];
for (int i =0; i <2; i++)
for (int j =0; j <2; j++)
if (v < m[i][j])
v = m[i][j];
return v;
}
int main()
{
int data[][2][2]={{{1,2},{3,4}},
{{5,6},{7,8}}};
cout << ttt(data[0])<< endl;
return 0;
}
Group of answer choices
5
2
6
4
1

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!