Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!decvax!genrad!mit-eddie!mit-vax!eagle!mhuxt!mhuxi!cbosgd!ihnp4!ixn5c!inuxc!pur-ee!uiucdcs!ccvaxa!mostek
From: mostek@ccvaxa.UUCP
Newsgroups: net.lang.c
Subject: Re: Array Initialization - (nf)
Message-ID: <2371@uiucdcs.UUCP>
Date: Thu, 7-Jul-83 23:46:40 EDT
Article-I.D.: uiucdcs.2371
Posted: Thu Jul  7 23:46:40 1983
Date-Received: Tue, 12-Jul-83 06:48:22 EDT
Lines: 14

#N:ccvaxa:8800007:000:528
ccvaxa!mostek    Jul  6 17:04:00 1983

 According to "The C Programming Language" by Kernigan and Ritchie,
 static and externals are ALWAYS initialized to zero, whereas automatic
 and register variables are garbage. So if you're array is external or
 static, you don't need to initialize it (and hope noone ever changes
 the declaration).

 If a C compiler doesn't follow this, there is a bug somewhere,
 in the C compiler or in the manual.

 If you have the execution time and text space to spare (one usually does),
 a safe rule is to always explicitly initialize.