Why is `int ( *array )[10] = malloc(...);` valid C code?
<p>I recently came across the following:</p>

<pre><code>int ( *array )[10] = malloc(...);
</code></pre>

<p>Based on my understanding of C's syntax and grammar, this looks like nonsense. It looks like an array is being created (and initialized) with the value of a dereferenced pointer as its identifier.</p>

<p>I understand the idea of pointers to arrays and assigning them blocks on the heap with malloc(), in general, at least. For instance, this makes sense:</p>

<pre><code>int *array = malloc(sizeof (int*) * 10);
</code></pre>

<p>...but, the first example looks like gibberish that shouldn't compile. Obviously, I'm missing something.</p>

<p>I feel like I saw whatever this is back when I was learning C, but Googling isn't helping to refresh my understanding. Searches with the terms "pointer", "dereferencing", and "initialization" obviously give results polluted with information on how one keeps track of dereferencing, etc. I'm hoping a human can help me.</p>