Multiple Choice
Which statement is correct about the execution of the loop in the following code fragment? double num;
Int incr = 0;
Scanner reader = new Scanner(System.in) ;
Do
{
Incr = incr + 1;
System.out.println("Please enter a number (0 when done) : ") ;
Num = reader.nextDouble() ;
}
While (num != 0) ;
System.out.println("" + incr) ;
A) The loop will execute only when 0 is entered.
B) The execution of the loop is independent of user input.
C) The program prints the count of positive inputs.
D) The loop will execute at least once even if the user has entered the sentinel value.
Correct Answer:

Verified
Correct Answer:
Verified
Q68: What is the output of the following
Q69: Suppose that a program asks a user
Q70: What is the output of this code
Q71: What changes do you need to make
Q72: What is the output of the following
Q74: How many times does the following loop
Q75: What will be printed by the statements
Q76: What will be the output of the
Q77: What is the output of the following
Q78: How many times does the code snippet