Very weird array declaration issue - C : <p>I call this function using "funcName 4"</p>

<pre><code>int main(int argc, char** argv) {
    int numPassedIn = atoi(argv[1]);
    printf("%d", numPassedIn);
    pid_t kidPID[numPassedIn]; 
</code></pre>

<p>The print statement prints "4". Makes sense.</p>

<p>The array kidPID, however, is not initialized (declared?) properly. There is no space for pid_t's to be stored.</p>

<p>If I alter the code to read </p>

<pre><code>int main(int argc, char** argv) {
    int numPassedIn = atoi(argv[1]);
    printf("%d", numPassedIn);
    pid_t kidPID[4]; 
</code></pre>

<p>it does provide space. What's going on here? Thanks in advance!</p>
