Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/28/84; site lll-crg.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!lll-crg!bandy From: bandy@lll-crg.UUCP (Andrew Scott Beals) Newsgroups: net.sources Subject: shortshort way of reversing the lines in a file Message-ID: <822@lll-crg.UUCP> Date: Sat, 31-Aug-85 21:05:58 EDT Article-I.D.: lll-crg.822 Posted: Sat Aug 31 21:05:58 1985 Date-Received: Mon, 2-Sep-85 04:20:50 EDT Distribution: net Organization: Computation Research Group, Lawrence Livermore Labs Lines: 24 Recently, some Gentleman from the UK posted a program that reversed the lines in a file. I figured that I should post this somewhat shorter solution. ----cute here, huh?---- /* * mirror the recursive way * */ #include main() { char foo[BUFSIZ]; if(gets(foo) == NULL) return; main(); puts(foo); } ----better cut here too---- At least I thought it was cute. Disclaimer: this program has very little to do with what they do here at Livermore.