for loop

for loop:

Syntax:
            for(initialization;condition;increment/decrement)
                {
                   body of loop
                 }

"for" loop is considered as easiest loop because the three main section initialization, condition and increment/decrement will be written in one line where as in other loop they are present in different parts of program. It is an entry controlled loop.

Comments