Page 717 - AP Computer Science A, 7th edition
P. 717

40. (D) In Implementation 1, the first element assigned is prod[1], and it multiplies arr[1] by prod[0], which was initialized to 1. To fix this implementation, you need a statement preceding the loop, which correctly assigns prod[0]: prod[0]=arr[0];


































































































   715   716   717   718   719