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 fifth row of sale?
A) sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[5][j];
B) sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[4][j];
C) sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[5][j];
D) sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[4][j];
Correct Answer:
Verified
Q21: Consider the following statement: int alpha[25][10];.Which of
Q27: Consider the following statement: double alpha[10][5];.The number
Q29: Consider the statement int list[10][8];.Which of the
Q30: Consider the following declaration: char charArray[51];
Char discard;
Assume
Q30: Suppose that gamma is an array of
Q31: For a list of length n, the
Q33: A collection of a fixed number of
Q37: Consider the following declaration: char str[15];.Which of
Q41: The following statements store the value _
Q43: Two (or more)arrays are called _ if
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