The OS will initialize the memory of the stack to 0 before the program starts. But before main is called, the compiler is free to insert other code that runs before main. gcc inserts a function named __libc_start_main that runs before main. This code will modify the content of the stack. So when main is run, the stack where the uninitialized local variable is has a decent chance of not being 0 anymore.<p>This is easily testable.<p><pre><code>    #include &lt;stdio.h&gt;
    
    int main(void) {
        char* pointers[20];
        int i;
        for (i = 0; i &lt; 20; ++i) {
          printf(&quot;%p\n&quot;, pointers[i]);
        }
        return 0;
    }
</code></pre>
And yes when I run it, most of the pointers are not null.