Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Small challenge: sort names Date: Wed, 08 Apr 2026 18:46:00 -0700 Organization: A noiseless patient Spider Lines: 43 Message-ID: <86pl48x5wn.fsf@linuxsc.com> References: <10r4h6o$396qn$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Thu, 09 Apr 2026 01:46:01 +0000 (UTC) Injection-Info: dont-email.me; posting-host="58cb476bd973d15d025d3b0e2ffe71fe"; logging-data="10980"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18avo3V1MFf8IRUUw3xdb6CaitGe1fl8ac=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:dJOfsm7laQCSgQzciqr4GEb0LdA= sha1:izQMAkgvWB5KdYSkltVMJgSC9H0= Xref: csiph.com comp.lang.c:397441 DFS writes: > Martin Hohenberg, Jae Yang, Tim Bando, Daniel Garber, Kyle Burkholder, > Mike Nichols, Mark Ping, Tom Taylor, Arnold F. Williams, George > Brower, Michael Nygard, Brendan Long, Sven Dowideit, Dave Witten, > Jonathan Cast, James Cronin, David L. Jessup, Christopher Chang, > Killer Delicious, Jacob Lyles, Neil Anuskiewicz, Mordant, Clemens > Ladisch, Wojciech Woytniak, Masa Bando, John Carmack, Xingyu Wang, > Jane Tang, Steven Evans, Jan Roudaut, Hsueh Sung, Ken LaCrosse, > taishi28012, John Simpson, Jerod Tufte, Paul Abbott, Stan Witherspoon, > Donald Greer, Gratiela Chergu, Michael Ciagala, Dale Carstensen, Chip > Davis, Liudmilla Karukina, Jim McCloskey, Dewey Sasser, Hal > Hildebrand, Connor Wood, Ken Kennedy, darrin, Mark Gardner, William > Christensen, Malcolm Ocean, Rod Davenport, Nodarius Darjania, Cheryl > Evry, Wenfeng Liang, Irving Rivas, Bill Soistman, ReallyBored, ???? > ?????, Ron Lauzon, TheFred, Paul Theodoropolous, Doug Phillips, Les > Vogel, Matt Pollard, Andres Cordova > > > Print first last (as shown above) but ordered by last first. My solution breaks down as follows 3 three #include lines 4 four blank lines between functions (or #include) 12 four functions, each with three non-body lines 10 one function (main) with 10 lines in its body 2 one function with 2 lines in its body 2 two functions with 1 body line each ---- 33 total lines Style observed Lines at most 79 characters Only one statement or declaration per line, except after for() or if() a single-statement body is allowed on same line, if everything fits Exactly one blank line before each function Indented nested blocks (eg, after for()) always use braces, 1TBS No blank lines inside functions All functions other than main() defined before use (the opposite of my preferred style)