Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: scanf used for to get a line |
| Date | 2016-11-03 13:50 -0700 |
| Organization | None to speak of |
| Message-ID | <lntwboxp80.fsf@kst-u.example.com> (permalink) |
| References | <15ea8d6d-0173-491c-b6b5-b1c57dd61769@googlegroups.com> <236c25a6-8c18-4082-ab3a-86eb55fb2408@googlegroups.com> <nvfoa6$lsu$1@dont-email.me> <0051af43-18c1-4f6c-ac52-608296ece9b8@googlegroups.com> |
asetofsymbols@gmail.com writes:
> I use now the C without prototypes
Why on Earth would you do that?
> and sys costant as stdin: For example I can do fflush(0) but not
> fflush(stdout)
fflush takes a FILE* argument. fflush(0) passes a null pointer, not
stdin. (The POSIX fileno for stdin is 0; stdin itself is a non-null
pointer of type FILE*.) It happens that fflush(NULL) flushes all active
streams for which flushing is defined, so it will probably work by
accident. (And of course fflush(stdin) has undefined behavior, though
an implementation can choose to define it.)
> Yes C is ok even not using prototypes (as int f( int a))
> and abuse all the language
> I not find errors of this type
> of absence of check...
> so I can not use stdin and so not use fgets but scanf().
> I use scanf because it is not serious code only for to game...
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
scanf used for to get a line asetofsymbols@gmail.com - 2016-11-01 01:50 -0700
scanf used for to get a line asetofsymbols@gmail.com - 2016-11-01 01:55 -0700
Re: scanf used for to get a line mark.bluemel@gmail.com - 2016-11-01 03:55 -0700
Re: scanf used for to get a line "Charles Richmond" <numerist@aquaporin4.com> - 2016-11-03 11:23 -0500
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-03 09:38 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-03 10:08 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-03 11:29 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-03 14:37 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-03 16:34 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-04 10:21 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-04 11:46 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-04 15:04 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-04 16:44 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-04 17:13 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-04 19:12 -0700
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-05 14:10 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-05 14:22 -0700
Re: scanf used for to get a line Tim Rentsch <txr@alumni.caltech.edu> - 2016-11-15 10:57 -0800
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-15 12:05 -0800
Re: scanf used for to get a line jameskuyper@verizon.net - 2016-11-15 14:01 -0800
Re: scanf used for to get a line Tim Rentsch <txr@alumni.caltech.edu> - 2016-11-16 10:54 -0800
Re: scanf used for to get a line Richard Damon <Richard@Damon-Family.org> - 2016-11-21 18:01 -0500
Re: scanf used for to get a line supercat@casperkitty.com - 2016-11-21 15:44 -0800
Re: scanf used for to get a line asetofsymbols@gmail.com - 2016-11-03 13:35 -0700
Re: scanf used for to get a line Keith Thompson <kst-u@mib.org> - 2016-11-03 13:50 -0700
Re: scanf used for to get a line ImperiusDamian <damianblack.wolf@gmail.com> - 2016-11-05 16:10 -0400
Re: scanf used for to get a line Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-01 11:39 +0000
Re: scanf used for to get a line asetofsymbols@gmail.com - 2016-11-01 05:47 -0700
Re: scanf used for to get a line Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-11-01 15:05 +0000
Re: scanf used for to get a line asetofsymbols@gmail.com - 2016-11-02 01:42 -0700
csiph-web