Multiple Choice
What is the output of the code snippet given below?
Int i;
Int j = 0;
For (i = 0; i < 5; i++)
{
If (i % 2 == 0)
{
I = i + 2;
J++;
}
Else
{
I++;
J = j + 2;
}
J++;
}
System.out.println("i=" + i + ", j=" + j) ;
A) i=7, j =7
B) i =7, j =6
C) i =6, j =7
D) i =5, j =5
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q19: The process of hand-tracing code is valuable
Q20: What will be printed by the statements
Q21: Is the code snippet written below legal?
Q22: Assume the following variable has been declared
Q23: How many times is the text "Let's
Q25: What is the output of the code
Q26: How many times does the following loop
Q27: Suppose that the chance to hit the
Q28: What does the following code snippet print?<br>Int
Q29: What will be printed by the statements