How many times does the loop body run? python i = 0 c = 0 while i < 8: c += 1 i += 2 print(c)

  1. 3
  2. infinite
  3. 4
  4. 5
Answer

C) 4

i takes 0, 2, 4, 6 – four repetitions. SLO CS-11-C-02

Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise