From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Beginner question... Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <00db01bfc03b$60e09e40$0500007b AT brk> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 X-Trace: /KiKeWX2pEkF25f1i2l2c3zWnv0bfQ5nAI/F9HODah2dgdXuHChAGDFWfZK8DBk0wlpHhKs4oDOP!LC5vL64PlA0/H3GUoEIKJZ4ZpbFmEZtR6a5BsyubhUOi+ptawNz0fJipJpcF5UU8v2NJW9SoRqpV!IY0JTiU= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Sat, 20 May 2000 19:04:28 GMT Distribution: world Date: Sat, 20 May 2000 19:04:29 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 17 May 2000 22:06:20 +0200, "Johan Henriksson" wrote: >Ok, I have this fun little question and yes, I know it's the basics :) >Can I expect a variable to initialize to 0 if none is set? Yes for global variables (declared outside a function). Perhaps for static variables (haven't read the standard). No for automatic variables (declared inside a function). No for malloc() or `new' memory allocated off the heap. This should help: http://www.google.com/search?q=comp.lang.c+FAQ -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/