For sample program output - Java Quiz Question


What will be the output of the following program?


A
i = 0
i = 1
i = 2
i = 3
i = 4
i = 5
i after the loop = 6
B
i = 0
i = 1
i = 2
i = 3
i = 4
i = 5
i = 6
C
Compilation Errors
D
i = 0
i = 1
i = 2
i = 3
i = 4
i = 5