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];
Correct Answer:
Verified
Q15: Arrays can be passed as parameters to
Q20: The array index can be any integer
Q21: After the following statements execute,what are the
Q23: Consider the following declaration: int alpha[5] =
Q26: Which of the following correctly declares and
Q32: In C++, the null character is represented
Q35: In row order form, the _.
A) first
Q38: In a(n) _ data type, each data
Q39: The word _ is used before the
Q40: The _ of an array is the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents