Variable declaration reset: Difference between revisions

Content added Content deleted
m (→‎{{header|C}}: oops 1 -> 0)
(→‎{{header|C}}: Added a caveat to comment.)
Line 62: Line 62:
return 0;
return 0;
}</lang>
}</lang>
<small>(Note: Obviously the <code>for (int i=0, prev</code> needs the outer i and the inner prev removed, and the same "int" added to the second loop, for it to compile cleanly.)</small>
<small>(Note: Obviously the <code>for (int i=0, prev</code> needs the outer i and the inner prev removed, and the same "int" added to the second loop, for it to compile cleanly though it only does so under C99 (or later) as for loop initial declarations are not allowed in C89/90.)</small>
{{out}}
{{out}}
<pre>
<pre>