Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!209.197.12.242.MISMATCH!nx01.iad01.newshosting.com!newshosting.com!216.196.98.142.MISMATCH!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 10 Sep 2011 04:51:14 -0500 Message-ID: <4E6B3312.1A33@mindspring.com> Date: Sat, 10 Sep 2011 05:51:15 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: hexump.c References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 29 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.223.169 X-Trace: sv3-N5YeyqksuZHO04kbFzuLkc+dNi9DLPDsACrbH7cL6+q5znxQq8EY6zQCqXGepXxqY4AT6ZuEJRErhtZ!9ge6oCuhmkTPw5DDQBqONCiV9wU7f88bREWYj/iumrnp2fnltun99zZttzEdKFa1z1pp/EYg0lBP!Db03kEp5RaE= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1885 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:10089 jacob navia wrote: > > Le 10/09/11 11:04, Nobody a écrit : > >> char *hex = "0123456789abcdef"; > > > > This should be "const". And there's no need for a pointer. IOW: > > > > const char hex[] = "0123456789abcdef"; > > > > Well, a pointer doesn't harm either. That array wouldn't be > zero terminated, that's why I do not use that construct. The array *would be* zero terminated. ISO/IEC 9899:1999 (E) 6.7.8 Initialization 14 An array of character type may be initialized by a character string literal, optionally enclosed in braces. Successive characters of the character string literal (including the terminating null character if there is room or if the array is of unknown size) initialize the elements of the array. -- pete