Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!uswnvg!dfpedro From: dfpedro@uswnvg.UUCP (Donn Pedro) Newsgroups: comp.lang.c Subject: Re: How do you truncate a file? Message-ID: <792@uswnvg.UUCP> Date: 7 May 91 14:23:44 GMT References: <1991May5.024348.4203@csusac.csus.edu> <1991May6.194614.9641@pensoft.uucp> Distribution: usa Lines: 19 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??? Could you then post the *faster* way? dfpedro@uswnvg.UUCP