🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Proof Techniques: all 9 questions

Quiz: Proof Techniques · Question 9 of 9

What does the termination step of a loop-invariant proof show?

What does the termination step of a loop-invariant proof show?

  1. A.That the loop runs at least once
  2. B.That the invariant is true before the loop
  3. C.That when the loop ends, the invariant gives the required result
  4. D.That the loop is fast
Answer & explanation

Correct answer: That when the loop ends, the invariant gives the required result

Initialisation and maintenance keep the invariant true; termination turns it into the answer.

Can you get the rest right without peeking?

Take the timed Quiz: Proof Techniques quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →