Multiple choice technology programming languages

What will be the output of the following program : void main() { int i,j; for (i=1; i<=3; i++) for (j=1; j<3; j++) { if (i == j) continue; if ((j % 3) > 1) break; printf("%d",i); } }

  1. 2,3

  2. 3,2

  3. 2,2

  4. 3,3

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The nested loops iterate i from 1-3 and j from 1-2. When i==j (i=1,j=1), continue skips to next j. For i=2, j=2: j%3=2 > 1 is false (2 is not > 1), so no break. printf prints '2'. For i=3, j=1: j%3=1 is not > 1, printf prints '3'. Output: 2,3.