Answer:
(d) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { anArray[n][m] = 0; }}
Step-by-step explanation:
Given
HEIGHT
rows
WIDTH
columns
Required
Fill the array with zeros
Assume the array has already been declared
First, we iterate through the rows; using:
for (int
;
;
) {
Next, we iterate through the columns
for (int
;
;
) {
Then we fill the array with the iterating variables of rows and the columns
anArray[n][m]
Lastly, close the loops
}}