Question 1 of 5
A festival booth map is walked in row-major nested for loops.
int[][] booths = { {4, 7, 1}, {8, 3, 6} };
for (int r = 0; r < booths.length; r++) {
for (int c = 0; c < booths[0].length; c++) {
System.out.print(booths[r][c]);
System.out.print(" ");
}
}
| Visit number | row r | col c | Value printed |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 |
(a) Complete the visit table. (b) Write the exact text printed, including spaces. (c) Explain why (1, 0) cannot print before (0, 2).