Multiple Choice Question

Quiz Guidelines

 

QID: 
159
Question: 

What will be the output if you run the following program?

public class TestClass{
public static void main(String args[]){
int i;
int j;
for (i = 0, j = 0 ; j < 1 ; ++j , i++){
System.out.println( i + " " + j );
}
System.out.println( i + " " + j );
}
}

Select 1 option

A. 0 0 will be printed twice.
B. 1 1 will be printed once.
C. 0 1 will be printed followed by 1 2.
D. 0 0 will be printed followed by 1 1.
E. It will print 0 0 and then 0 1.

Q&A Set: