Multiple Choice
What is the output of the following code snippet? double a = 2;
Int n = 16;
Double r = 1;
Double b = a;
Int i = n;
While (i > 0)
{
If (i % 2 == 0) // n is even
{
B = b * b;
I = i / 2;
}
Else
{
R = r * b;
I--;
}
}
System.out.println("r = " + r) ;
A) r = 16.0
B) r = 128.0
C) r = 4096.0
D) r = 65536.0
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q1: What does the following loop compute? Scanner
Q2: What will be the range of the
Q3: Which of the following activities can be
Q4: Which of the following is considered a
Q5: What is the output of the code
Q7: Which of the following conditions can be
Q8: Is the following code snippet legal? boolean
Q9: What will be the output of the
Q10: Choose the loop that is equivalent to
Q11: What is the output of the following