8. (TCO 4) What does the following code do? double calc( double data[10][10] ) {
ID: 3542741 • Letter: 8
Question
8. (TCO 4) What does the following code do?double calc( double data[10][10] )
{
double value = 0;
for(int i = 0; i < 10; i += 2)
for(int j = 0; j < 10, j++)
value += data[i][j];
return value;
} (Points : 1) Calculates the average of the contents of the data array
Calculates the sum of the contents of the data array
Calculates the sum of the elements of the even rows of the data array
Calculates the sum of the elements of the even columns of the data array
9. (TCO 4) The following code fragment
struct batter
{
string name;
int rbi;
};
batter p1;
cout << 9. (TCO 4) The following code fragment
struct batter
{
string name;
int rbi;
};
batter p1;
cout <<
Explanation / Answer
Calculates the sum of the elements of the even rows of the data array
copies only p1
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.