Given the following declaration: 
int j;int sum;double sale[10][7]; 
 
which of the following correctly finds the sum of the elements of the fourth column of sale?

A. sum = 0;
for(j = 0; j < 7; j++)  sum = sum + sale[j][3];
B. sum = 0;
for(j = 0; j < 7; j++)
  sum = sum + sale[j][4];
C. sum = 0;
for(j = 0; j < 10; j++)
  sum = sum + sale[j][4];
D. sum = 0;
for(j = 0; j < 10; j++)
  sum = sum + sale[j][3];

Answer: D

Computer Science & Information Technology

You might also like to view...

________ allow you to separate related records for the purpose of creating a visual summary of the data

A) Headers B) Subtotals C) Groups D) Footers

Computer Science & Information Technology

What database key links one table to another?

A) Primary key B) Foreign key C) Secondary key D) Relational key

Computer Science & Information Technology