The following fragment intends that a user will enter a list of positive integers at
the keyboard and terminate the list with a sentinel:
int value = 0;
final int SENTINEL = -999;
while (value != SENTINEL)
{
//code to process value
...
value = IO.readInt(); //read user input
}
The fragment is not correct. Which is a true statement?
(A) The sentinel gets processed.
(B) The last nonsentinel value entered in the list fails to get processed.
(C) A poor choice of SENTINEL value causes the loop to terminate before all
values have been processed.
(D) The code will always process a value that is not on the list.
(E) Entering the SENTINEL value as the first value causes a run-time error.