Answer & Solution
Answer: Option C
Solution:
Solution:
The code contains a nested for loop structure.
The outer loop iterates with variable
i from 0 to 2 (inclusive), and the inner loop iterates with variable
j from 0 to 1 (inclusive).
For each iteration of the outer loop (each value of
i), the inner loop runs completely, iterating through both values of
j.
The output is printed as follows:
When
i = 0:
j = 0 → output is 00
j = 1 → output is 01
When
i = 1:
j = 0 → output is 10
j = 1 → output is 11
When
i = 2:
j = 0 → output is 20
j = 1 → output is 21
Combining all outputs, the final result is:
00 01 10 11 20 21