Question 1 of 5
Complete the missing trace cells for this indexed loop. Then state the final value of total.
int[] packs = {4, 1, 6};
int total = 0;
for (int i = 0; i < packs.length; i++) {
total += packs[i];
}
| Body | i | packs[i] | total after body |
|---|---|---|---|
| 1 | 0 | 4 | |
| 2 | |||
| 3 |