English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Define a loop invariant. - Computer Science

Advertisements
Advertisements

Question

Define a loop invariant.

Short Note

Solution

In iteration, the loop body is repeatedly executed as long as the loop condition is true. Each time the loop body is executed, the variables are updated. However, there is also a property of the variables which remains unchanged by the execution of the loop body. This unchanging property is called the loop invariant.

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 2. | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×