Initialization of arrays (newbie)

Steve Dondley s@dondley.com
Sun Aug 25 08:09:00 GMT 2002


I've read on the net that a declaration such as

int a[100];

results in all the elements of the array getting initialized to 0.

However, this doesn't appear to be the case with gcc.  I have to use a for
loop and manually set each element to zero.  There must be a better way.
What is it?



More information about the Gcc-help mailing list