Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Programming exercise/challenge Date: Tue, 08 Dec 2020 23:39:55 -0800 Organization: A noiseless patient Spider Lines: 22 Message-ID: <86im9b5sxg.fsf@linuxsc.com> References: <86wnxwkyol.fsf@linuxsc.com> <20201205083810.0@kylheku.com> <20201205085002.243@kylheku.com> <20201205104248.307@kylheku.com> <20201205151302.394@kylheku.com> <20201207182512.515@kylheku.com> <20201208160437.44860a2351f9f468bd03f65f@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="5eb73538a536c16dceb299f9d9a18884"; logging-data="24239"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VgjRm7VDNanV+wJUCgnkDqiQS5ERgxQM=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:NOE4Qa62docV89/Y5z59oVxFtZo= sha1:Wi61kTGEbx7PYY0eTjPVfe0rUXA= Xref: csiph.com comp.lang.c:157128 Anton Shepelev writes: > Kaz Kylheku: > >> This is a bug; > > For the benefit of whoever may be collecting the entries, I > ask you to post full updated versions of your solutions, in > addition to, indicating bugs. It is much easier to copy- > paste a program form the newsreader than manually to apply > the indicated changes the previous copy, which is also > error-prone. Thank you for this comment. Also, could people please limit their source lines to 80 (or better, 79) characters? Otherwise various news handling software breaks the lines in places that are in many cases inconvenient. Oh, Anton, while I'm thinking of it - use int main( void ) rather than void main( void ). When I first compiled your program the void return type on main() gave an error and I had to edit the source to fix that.