Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!ogicse!cvedc!gssc!timr From: timr@gssc.UUCP (Tim Roberts) Newsgroups: comp.lang.c Subject: Re: New 'n' Improved comp.lang.c FAQ List Message-ID: <6630@gssc.UUCP> Date: 3 Apr 91 18:53:36 GMT References: <910401.0xf001@etiquette.uu.net> <1991Apr1.203024.19679@unlv.edu> <3739@jethro.Corp.Sun.COM> Organization: Graphic Software Systems, Inc. Beaverton, Or. Lines: 28 In article <3739@jethro.Corp.Sun.COM> fguille@France.Sun.COM writes: :>bls@u02.svl.cdc.com (Brian Scearce) writes: :> Almost, but not quite, Mr. Grover. The *really* correct version of this: :> char *itoa(int i) { :> static char retbuf[5]; /* biggest int: 32768 */ :> sprintf(retbuf, "%d", i); :> return retbuf; :> } :>Should'nt the *really really correct* version allocate an extra character :>in the retbuf array for the end of string delimiter \0 ??? :> :>I will just say that a *just a little bit more correct* version should read: :> :> static char retbuf[6]; /* biggest int: 32768 */ Shouldn't the *really truly one-true-God correct* version of this read: static char retbuf[6]; /* biggest int: 32767 */ And isn't this really really just a little bit more silly than we all need? -- timr@gssc.gss.com Tim N Roberts, CCP Graphic Software Systems Beaverton, OR This is a very long palindrome. .emordnilap gnol yrev a si sihT