Multiple Choice
Given the following code fragment, what is the final value of y?
Int x, y;
X = -1;
Y = 0;
Whilex <= 3)
{
Y += 2;
X += 1;
}
A) 2
B) 10
C) 6
D) 8
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q2: What is the value of x after
Q3: Which of the following is a valid
Q4: Given the following code fragment, which of
Q5: What is the value of x after
Q6: What is the final value of x
Q7: The body of a while loop may
Q8: Variable names may begin with a number.
Q9: The stream that is used for input
Q10: Which of the following statements is NOT
Q11: The opposite of x >3 && x