Lessons and articles about C programming language

Examples of FOR loop usage in C language

Dear customers, today we would like to draw your attention to the FOR loop definition and it's usage in C programming language.

In software development, term cycle means execution of the same command several times until the condition of the loop is true. From that we can understand that program's code is executed repeatedly in the FOR loop. As you have already noticed, an important element of the loop is the condition that allows to break operations. The program will be repeated continuously until the condition is true. If it is always true, then you will not have an exit point from the loop. Such cycles are called "unconditional".

Instructions and code that are used in the loop are called body of the cycle. A single execution of an instruction is called iteration of a cycle. The number of executions are counted by the iterator, in case if it is used.