Given the following declaration: 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
Q20: The array index can be any integer
Q21: Consider the following statement: int alpha[25][10];.Which of
Q22: Which of the following correctly declares name
Q23: Consider the following declaration: int alpha[5] =
Q24: Consider the following declaration:char charArray[51]; char discard;
Assume
Q26: Which of the following correctly declares and
Q27: Consider the following statement: double alpha[10][5];.The number
Q28: The form of the for loop shown
Q29: Consider the statement int list[10][8];.Which of the
Q30: Suppose that gamma is an array of
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