By | December 13, 2016

C++ for loop is used when you know how many times you want statement or a block of statements to be executed.


1.Initialization: Initialize the loop counter value. For example: i=1; .

2.Condition: Condition is evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends. For example: i<=10; .
3.Increment:Increase the loop counter values. For example: i++ ;.




Leave a Reply

Your email address will not be published. Required fields are marked *