Displaying char array in gcc does not work
<p>I wrote a piece of code and tested with gcc compiler</p>

<pre><code>#include &lt;iostream&gt;

int main()
{
    char arr[ 1000 ];
    for( int index( 0 ); index &lt; 1000; ++index )
    {
        std::cout &lt;&lt; arr[ index ] &lt;&lt; std::endl;
    }
    return 0;
}
</code></pre>

<p>I was hoping it to print the garbage values but to my surprise, it did not print anything. When I simply changed the datatype of arr from char to int, it displayed the garbage values as expected. Could somebody please explain this to me?</p>
