Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!r3jjs From: r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) Newsgroups: comp.lang.c Subject: Re: How do you truncate a file? Message-ID: <1331@VAX1.CC.UAKRON.EDU> Date: 8 May 91 02:41:58 GMT References: <1991May5.024348.4203@csusac.csus.edu> <1991May6.194614.9641@pensoft.uucp> Reply-To: r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) Distribution: usa Organization: U of Akron Computer Center, Ohio Lines: 33 In article <1991May6.194614.9641@pensoft.uucp> lwb@pensoft.uucp (Lance Bledsoe) writes: >In article fitz@mml0.meche.rpi.edu (Brian Fitzgerald) writes: >>Rudi Cilibrasi writes: >>>Suppose I have a 100-byte file called "myfile.dat", and I want to get >>>rid of the last 10 bytes. >> >>#include >>main () { >>int i; >>for (i=0; i < 90 ; i++) { >> (void) putchar(getchar()); > >Do you think you could have thought of a *slower* way to do this??? > #include main () { int i; for (i = 0; i < 90; i++) { (void) putchar(getchar()); sleep(60); /* Make it even slower */ } } -- --------------------------+--------------------------------------------------- Jeremy J Starcher ! No programmer programs in LOGO after reaching r3jjs@vax1.cc.uakron.edu ! age 14... r3jjs@akronvm.bitnet !