I have a
int val,i;
scanf("%d",&val);
int a[] = { (val & 0x7) , (val & 0x5) };
for(i=0;i<2;i++)
printf("%d\n",a[i]);
I am confused whether the above code is good or not? I get this error on some compiler
expression must have a constant value
but on another this works fine.So is this code good?
ahave? If you need two, why not to defineint a[2]?