S
Sensei
Hi again! I have ``yet another silly question'', about arrays this time.
I've looked through the FAQs in the array & memory sections without
finding an answer. I surely didn't look deep enough.
What does the standards (plural! C99 and pre-C99 standards) say about
variable-initialized arrays like in the following code?
int main(void)
{
int a = 6;
char s[a];
/* ... */
return 0;
}
If my memory doesn't fail, that is not pre-C99 compliant and resulting
in a compiler error, but I'm not sure... And does C99 state something
about the initializer ``int a''? I mean, what if it is NOT initialized?
I know, curiosity killed the cat
I've looked through the FAQs in the array & memory sections without
finding an answer. I surely didn't look deep enough.
What does the standards (plural! C99 and pre-C99 standards) say about
variable-initialized arrays like in the following code?
int main(void)
{
int a = 6;
char s[a];
/* ... */
return 0;
}
If my memory doesn't fail, that is not pre-C99 compliant and resulting
in a compiler error, but I'm not sure... And does C99 state something
about the initializer ``int a''? I mean, what if it is NOT initialized?
I know, curiosity killed the cat