Segmentation fault for reading 31,622,400 characters from a file
<p>Here is the source code:</p>

<pre><code>int main() {
    int secondsInYear = 366*24*60*60; // Equals 31,622,400
    short int data[secondsInYear];
    FILE * pFile;
    pFile = fopen ("stat", "r");
    fread(data, sizeof(short int), secondsInYear, pFile);
    fclose(pFile);
}
</code></pre>

<p>on line <code>fopen("stat", "r")</code> it gives me the segmentation fault error! If I read <code>secondsInYear/10</code> characters it will execute without any problem, So what seems to be the problem? And what's the solution?</p>
