title: Integer array of variable length
body: <p>I have a </p>
  
  <pre><code>int val,i;
  scanf("%d",&amp;val);
  int a[] = { (val &amp; 0x7) , (val &amp; 0x5) };
  for(i=0;i&lt;2;i++)
  printf("%d\n",a[i]);
  </code></pre>
  
  <p>I am confused whether the above code is good or not?
  I get this error on some compiler</p>
  
  <pre><code>expression must have a constant value
  </code></pre>
  
  <p>but on another this works fine.So is this code good?</p>