A nested loop with outer 3 times and inner 4 times runs the inner body
Q.A nested loop with outer 3 times and inner 4 times runs the inner body
A) 4 times
B) 3 times
C) 7 times
D) 12 times
Correct Answer:
Option D
Detailed Explanation:
D) 12 times is correct. A for loop has initialization, condition, and update parts separated by semicolons. Initialization runs once; the condition controls repetition and the update changes the loop variable.