Multi variable for loop output - Java Quiz Question


What will be the output of the following program?


A
Compilation error since both a++ and b--
should not be present in the iteration section (i.e after the second semicolon)
B
a = 1
b = 4
a = 2
b = 3
a = 3
b = 2
C
a = 1
b = 4
a = 2
b = 3
D
Compilation error since both a = 1 and b = 4
should not be present in the initialization section (i.e before the first semicolon)