Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!natinst!sequoia!uudell!pensoft!lwb From: lwb@pensoft.uucp (Lance Bledsoe) Newsgroups: comp.lang.c Subject: Re: How do you truncate a file? Message-ID: <1991May6.194614.9641@pensoft.uucp> Date: 6 May 91 19:46:14 GMT References: <1991May5.024348.4203@csusac.csus.edu> Distribution: usa Organization: Pencom Software, Austin, TX Lines: 20 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??? -- Lance Bledsoe Off: (512) 343-1111 Pencom Software, Inc. Fax (512) 343-9650 8716 Loop 360 N. Suite 300 UUCP: cs.utexas.edu!pensoft!lwb Austin, Texas 78759 UUNET: uunet!uudell!pensoft!lwb