I compiled your program and got the output
the answer b is wrong.According to the program
firt i=0 and j=0
the if conditons becomes true and again it goes to Outer
then i=1 and j=0 the if condition returns false and i=1,j=0 is printed.
now j value is incrimented and becomes j=1 the if conditon returns true so it continues outer then
now i=2 and j=0 the if condition returns false and i=2,j=0 is printed
now j value is incremented and becomes j=1 theif conditon returns false and i=2,j=1 is printed.
now control goes to for loop jis incremented to 2
now the if condition returns true and it continues outer
and the progam terminates.
Hope this helps!.