Westonci.ca is the best place to get answers to your questions, provided by a community of experienced and knowledgeable experts. Experience the convenience of getting reliable answers to your questions from a vast network of knowledgeable experts. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.
Sagot :
Answer:
(d) for (int n=0; n < HEIGHT; n++) { for (int m=0; m < WIDTH; m++) { anArray[n][m] = 0; }}
Explanation:
Given
HEIGHT [tex]\to[/tex] rows
WIDTH [tex]\to[/tex] columns
Required
Fill the array with zeros
Assume the array has already been declared
First, we iterate through the rows; using:
for (int [tex]n=0[/tex]; [tex]n < HEIGHT[/tex]; [tex]n++[/tex]) {
Next, we iterate through the columns
for (int [tex]m=0[/tex]; [tex]m < WIDTH[/tex]; [tex]m++[/tex]) {
Then we fill the array with the iterating variables of rows and the columns
anArray[n][m]
Lastly, close the loops
}}
Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.