← 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?
- A.That the loop runs at least once
- B.That the invariant is true before the loop
- C.That when the loop ends, the invariant gives the required result
- 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 →