static versus auto initialization

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Jan 21 01:29:13 AEST 1989


In article <7483 at chinet.chi.il.us> john at chinet.chi.il.us (John Mundt) writes:
>Since the stack is constantly reused and not initialized, the value 
>of abc_auto[4] is whatever happened to be in that memory location.  

I'm sure that's what was happening, but it's not what is supposed to
happen.  Initialization of an array should initialize ALL its elements,
not just the ones explicitly specified in the source code.



More information about the Comp.lang.c mailing list