When processing all the elements of row i of a two-dimensional array named grades using a for loop with variable j, what is the
condition of the for loop? _________________ .
a. j < length
b. j < grades.length
c. j < = grades.length
d. j < grades [i].length
e. j < = grades [i].length
1 answer:
Answer:
D
Explanation:
Two dimensional array contain both rows and columns. Each row represented one record and each column represent one filed in that record.
for ex: int grades[5][3];
here array grades contains 5 rows and in each row we have 3 columns
if we have grades[i][j] then " i " represents number of rows and j represents the number of columns in that row.
j<grades[i].length represents i=0 to 2[here no of columns are 3, array index starts from 0 to 2]
The Answer is D
You might be interested in
You can use it when like confirming a policy
Data splitting:::::::::::)
<span>C. Rulers indicate the margins, tabs, and indents in a presentation slide.
</span>
Answer: The computer does not meet minimum requirements of the software program because too much energy gets put in it
Explanation:
Good luck