Important MCQ

Output? for (int i = 1; i <= 3; i++) { for (int j = 1; j <= 3; j++) { if (j == 2) break; cout << j; } } cout << "|";

Q.Output? for (int i = 1; i <= 3; i++) { for (int j = 1; j <= 3; j++) { if (j == 2) break; cout << j; } } cout << "|";

A) 111|
B) 123 123|123|
C) 13 13|13|
D) 1
Correct Answer:
Option A
Detailed Explanation:
break exits only the inner loop.