Why is the i++ used in arrays
<pre><code>#include &lt;iostream&gt;

int main()
{
    int myArray[5];     // array of 5 integers lol
    int i;
    for (i=0; i&lt;5; i++ )  // 0 - 4
    {
        std::cout &lt;&lt; "Value for myArray[" &lt;&lt; i &lt;&lt; " ]: ";
        std::cin &gt;&gt; myArray[i];
    }
    for (i = 0; i&lt;5; i++)
    std::cout &lt;&lt; i &lt;&lt; ": " &lt;&lt; myArray[i] &lt;&lt; std::endl;
    return 0;
}
</code></pre>

<p>Why is i++ required for this program to work?</p>
