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

 (D)
 (E)
21. Consider the following program segment:
/∗ ∗ Precondition: a[0]...a[n–1] is an initialized array of integers,
∗ and 0 < n <= a.length. ∗/
int c = 0;
for (int i = 0; i < n; i++)
if (a[i] >= 0) {
a[c] = a[i];


























































































   537   538   539   540   541