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...

You can choose which actions users can perform on locked cells in a protected worksheet

Indicate whether the statement is true or false.

Computer Science & Information Technology

How are events synchronization and data representation handled during a session of remote conversation, such as when you speak to someone over the phone?

Consider inter-human communications.

Computer Science & Information Technology