Which set of statements totals the items in each row of two-dimensional array items, and displays each row’s total?

a.
for (int row = 0; row < items.length; row++) {
int total = 0;

for (int column = 0; column < items[row].length; column++) {
total += items[row][column];

System.out.printf("Row %d's total is %d%n", row, total);
}
b.
int total = 0;

for (int row = 0; row < items.length; row++) {
for (int column = 0; column < items[row].length; column++) {
total += items[row][column];
}

System.out.printf("Row %d's total is %d%n", row, total);
}
c.
int total = 0;

for (int row = 0; row < items.length; row++) {
for (int column = 0; column < items[column].length; column++) {
total += items[row][column];
}

System.out.printf("Row %d's total is %d%n", row, total);
}
d.
for (int row = 0; row < items.length; row++) {
int total = 0;

for (int column = 0; column < items[column].length; column++) {
total += items[row][column];
}

System.out.printf("Row %d's total is %d%n", row, total);
}

a.
for (int row = 0; row < items.length; row++) {
int total = 0;

for (int column = 0; column < items[row].length; column++) {
total += items[row][column];
}

System.out.printf("Row %d's total is %d%n", row, total);
}

Computer Science & Information Technology

You might also like to view...

The ______ page specifies which record group columns appear in the LOV display.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Calculating the specificity using weighting methodology, which of the following selectors have the highest weight?

A. id selectors B. element selectors C. class selectors D. type selectors

Computer Science & Information Technology