Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!mcnc!rti!sheol!throopw From: throopw@sheol.UUCP (Wayne Throop) Newsgroups: comp.lang.c Subject: write(fd,"foobar",sizeof("foobar")) Summary: watch out for this one... Message-ID: <0977@sheol.UUCP> Date: 22 Sep 90 22:28:02 GMT References: <8103@aggie.ucdavis.edu> <1990Sep22.130345.15450@virtech.uucp> Lines: 14 Lines: > From: jdarcy@encore.com (Jeff d'Arcy) > static char message[] = "hello"; > /* ... */ > write(fd,message,sizeof(message)); Note that (sizeof(message)) is 6... the suggested "write" will solve the question on that other thread... how to write a NUL to a file. ( Also note that the form as it appears in the Subject: line has been known to break pcc-based compilers if I remember right... they were promoting "foobar" to a pointer "too soon". Getting Jeff's verseion wrong seems much, much rarer. ) -- Wayne Throop !mcnc!rti!sheol!throopw or sheol!throopw@rti.rti.org