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
You might also like to view...
(Sides of a Right Triangle) Write a program that reads three nonzero integers and deter- mines and prints whether they could be the sides of a right triangle.
What will be an ideal response?
The tabs that enable you to play, organize, rip, burn, or synchronize your multimedia files are found in which one of the following Windows Media Player taskbars?
A) Home theater taskbar B) Player taskbar C) Control taskbar D) Files taskbar
The order of operations determines the sequence by which operations are calculated
Indicate whether the statement is true or false
It is possible to modify an existing style, or make formatting changes, after a style has been applied to a table
Indicate whether the statement is true or false