J
joshc
Hi,
I have an array defined in one file with an intializer as follows:
int arr[] = {0, 1, 2, 3};
I have a declaration of the array in another file as follows:
extern int arr[10];
This compiles without a problem on my implementation and arr ends up
being of size 10 on my implementation. Is this legal in "standard C"? I
was reading question 1.24 of the FAQ but that didn't seem to answer my
question in this case. Is the array definition with the initializer
somehow an incomplete definition?
Thanks for the help,
Josh
I have an array defined in one file with an intializer as follows:
int arr[] = {0, 1, 2, 3};
I have a declaration of the array in another file as follows:
extern int arr[10];
This compiles without a problem on my implementation and arr ends up
being of size 10 on my implementation. Is this legal in "standard C"? I
was reading question 1.24 of the FAQ but that didn't seem to answer my
question in this case. Is the array definition with the initializer
somehow an incomplete definition?
Thanks for the help,
Josh