Path: csiph.com!weretis.net!feeder4.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 18 May 2017 15:51:12 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Some ideas about c? References: Date: Thu, 18 May 2017 21:51:12 +0100 Message-ID: <87bmqp7utb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:NdEy8fv5l0clPD9jE3dTS3lrH6c= MIME-Version: 1.0 Content-Type: text/plain Lines: 15 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-g8ufrJGhwwEdmDx//aLgiQtu2/YqoOUZ9/RdrqIPhdlxFzwEd831DPtBhWiKqaUtr3MkqHevdZk4Ys7!ktOZzuxrSI7iS1RRXTZcMc19MfGEEJi0ZHbWBIxB/0/P0yN3koiIZaqX9jkHiF5ES+XgX5M= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1540 Xref: csiph.com comp.lang.c:110331 scott@slp53.sl.home (Scott Lurndal) writes: > int main() { char buffer[512]; fputs(fgets(buffer, sizeof(buffer), > stdin), stdout); } Great. Except it doesn't work if the input line is too big. > For that matter, this code also compiles just fine as C++ code. But doesn't run fine as either. I assume, you knew that. So you've demonstrated how its marginally simpler to write incorrect code in C than correct code in C++. Erm ... well done?