What is the output of the code snippet given below?
Int i = 0;
While (i != 9)
{
System.out.println("" + i) ;
I = i + 2;
}
A) No output
B) 0 2 4 6 8
C) 10 12 14 16 18 …. (infinite loop)
D) 0 2 4 6 8 10 12 14 …. (infinite loop)
Correct Answer:
Verified
Q6: What is the output of the following
Q7: How many times does the following code
Q8: What are the values of i and
Q9: How many times does the code snippet
Q10: What is the output of the code
Q12: What is the output of the code
Q13: What are the values of i and
Q14: Which error type does the "off-by-one" error
Q15: What is the output of the code
Q16: What is the output of the following
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents