Segmentation fault error array in c : <p>I want to write a program in which I want to initialize integer array of size 987654321 for storing values of 1 and 0 only,
here is my program</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main(){
    int x,y,z;
    int limit = 987654321;
    int arr[limit];
    for (x = 0;x &lt; limit;x++){
        printf("%d \n",arr[x]);
    }
    return 0;
}
</code></pre>

<p>but it gives segmentation fault</p>
