C-18-Q035mediummulti_combo_mcq
Which of the following is true about a nested while loop?
Which of the following is true about a nested while loop?
- The inner loop fully runs before the outer loop's next iteration continues
- The inner loop and outer loop must use the same counter
- An
ifwithbreakcan be used to exit the inner loop early
- ai and ii
- bi and iii
- cii and iii
- di, ii, and iii
ব্যাখ্যা
The inner loop runs fully for each outer iteration (i), and an if containing break can exit the inner loop early (iii). The two loops need separate counters, so statement (ii) is false.