What is the output of the following code snippet?
Int i = 1;
While (i < 10)
{
System.out.print(i + " ") ;
I = i + 2;
If (i == 5)
{
I = 9;
}
}
A) 1 3 5
B) 1 3 9
C) 1 3 5 7 9
D) 1 3 5 9
Correct Answer:
Verified
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
Q18: How many times will the following loop
Q19: What is the output of the following
Q20: What is the output of the code
Q21: What is the output of the code
Q22: What will be the result of running
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