Adding to an Array in C/C++ with no size : <p>The following code compiles and outputs <code>6</code>:</p>

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

int main(){
 int a[]={};
 a[0] = 5;
 a[1] = 6;
 printf("%d\n", a[1]);
 return 0;
}
</code></pre>

<p>Is this correct or am I getting into undefined behaviour and this code woks by luck? Can I add to an array with no size?</p>
