The following program segment is intended to find the index of the first negative integer in arr[0] . . . arr[N-1], where arr is an array of N integers.
int i = 0;
while (arr[i] >= 0)
{
i++;
}
location = i;
This segment will work as intended
(A) always.
(B) never.
(C) whenever arr contains at least one negative integer.
(D) whenever arr contains at least one nonnegative integer.
(E) whenever arr contains no negative integers.