How many times the for statement given below is executed?

ICSE Class 10 Computer Applications PYQ · 2025 Improvement · Section A

1(xix)1 Mark · 2025 · Section A · 2025 Improvement

How many times the for statement given below is executed?

for(k = 10; k >= 0; k--)

Show SolutionHide Solution↓

11

Reason — The loop starts with k = 10 and runs while k >= 0. This includes both k = 10 and k = 0, so the values of k will be: 10, 9, 8, ..., 1, 0 — a total of 11 iterations.

← Previous questionNext question →

Browse the free Computer Applications sample bank