1(xix)
How many times the for statement given below is executed?
for(k = 10; k >= 0; k--)
- (a)10
- (b)11
- (c)12
- (d)0
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.