Global Arrays in C++
<p>Why the array is not overflowed (e.g. error alert) when the array is declared globally, in other why I'm able to fill it with unlimited amount of elements (through for) even it's  limited by size in declaration and it does alert when I declare the array locally inside the main ?</p>

<pre><code>char name[9];


int main(){


    int i;


    for( int i=0; i&lt;18; ++i){
    cin&gt;&gt;name[i];


    }

    cout&lt;&lt;"Inside the array: ";
    for(i=0; i&lt;20; i++)
    cout&lt;&lt;name[i];

    return 0;

}
</code></pre>
