What is the output of the code snippet given below?
Int i = 0;
While (i != 11)
{
System.out.print(" " + 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
Q16: What is the output of the following
Q17: What is the output of the following
Q18: How many times will the following loop
Q19: What is the output of the following
Q20: What is the output of the code
Q22: What will be the result of running
Q23: What are the values of i and
Q24: Which of the following code snippets displays
Q25: How many times does the following code
Q26: How many times does the loop execute
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