English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Does testing the loop condition affect the loop invariant? Why? - Computer Science

Advertisements
Advertisements

Question

Does testing the loop condition affect the loop invariant? Why?

Short Note

Solution

No, the loop condition does not affect the loop invariant. Because the loop invariant is true at four points.

  1. At the start of the loop.
  2. At the start of each iteration.
  3. At the end of each iteration.
  4. At the end of the loop.
shaalaa.com
Loop Invariant
  Is there an error in this question or solution?
Chapter 8: Iteration and recursion - Evaluation - Section - B [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 8 Iteration and recursion
Evaluation - Section - B | Q 3. | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×