Advertisements
Advertisements
Question
Given: for (i = 0; i < 4; i++)
for (j = 1; j < 4; j++)
.............................
Statement
.............................
How many times the above nested loop will iterate?
Options
12 times
8 times
4 times
16 times
MCQ
Solution
12 times
Explanation:
4 (outer loop iterations) ×3 (inner loop iterations) = 12 total iterations.
shaalaa.com
Is there an error in this question or solution?