Syntax:
<span class="kwd">for</span><span class="pun">(</span><span class="pln">expression</span><span class="pun">-</span><span class="lit">1</span><span class="pun">;</span><span class="pln">expression</span><span class="pun">-</span><span class="lit">2</span><span class="pun">;</span><span class="pln">expression</span><span class="pun">-</span><span class="lit">3</span><span class="pun">)</span> <span class="pun">{</span> <span class="com">//set of statements</span> <span class="pun">}</span>
When control reaches for expression-1 is executed first. Then following expression-2, and if expression-2 evaluates to non-zero ‘set of statements’ and expression-3 is executed, follows expression-2.