Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!paperboy!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: More getch() woes Message-ID: <15587@smoke.brl.mil> Date: 26 Mar 91 22:15:36 GMT References: <669422030.1@opocus.Fidonet.Org> <1991Mar25.145517.3427@viewlogic.com> <19058@lanl.gov> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <19058@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: > int c[25] = {0}; >This should do what you want in both K&R and ANSI compliant code. No, that's an attempt to initialize an auto aggregate, which certainly is not required by the C language described in K&R 1st Edition. In practically all implementations, memset() would be a nice fast method of initializing an array of integer type to all zeros. To be absolutely safe, you need to use the obvious little loop.