Utility Functions and C Language Reference > C Language Reference > Alphabetical List of Functions > for


Example: for

A control flow keyword used to perform an action repeatedly.

for (initial_expression, conditional_expression, loop_expression)

All three expressions in the for statement are evaluated. If the initial or conditional expressions are false or become false, the for loop terminates. The initial_expression is evaluatedonly at the start of loop execution. At each iteration, the conditional_expression and the loop_expression are evaluated. The loop_expression is typically used to increment an index which the conditional_expression uses to terminate the loop.