Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #76393

Re: EOF issue

From "Osmium" <r124c4u102@comcast.net>
Newsgroups comp.lang.c
Subject Re: EOF issue
Date 2015-11-18 06:48 -0600
Message-ID <db3adaFo5fdU1@mid.individual.net> (permalink)
References <39e3aac5-5b96-4a07-9078-4a6c0207e0df@googlegroups.com> <db307lFk8g8U1@mid.individual.net> <6b87a6bb-ffc0-4a4b-b0dd-c1906fb60c00@googlegroups.com>

Show all headers | View raw


"Alla _" <modelling.data@gmail.com> wrote in message 
news:6b87a6bb-ffc0-4a4b-b0dd-c1906fb60c00@googlegroups.com...
>
>> Are you referring to this line
>>
>>      while ((c = getchar()) != EOF)
>>
>> ?
>>
>> This will loop until getchar() sees an end of file condition.  This will
>> happen either
>>
>> a) if you run the program and type stuff in, when you hit the end of
>> file character (ctrl-D on Unix, ctrl-Z on Windows)
>>
> Thank you for your reply. Yes, I am referring to this part
> while ((c = getchar()) != EOF).
>
> I have tried both Ctrl-D and Ctrl-Z on my Mac. Ctrl-D didn't have
> any effect; Ctrl-Z stopped the program.
> Therefore, I am not sure how authors suggest to use this program, given
> no piping is implied (it's just the beginning of the book). 

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

EOF issue Alla _ <modelling.data@gmail.com> - 2015-11-18 01:03 -0800
  Re: EOF issue Ian Collins <ian-news@hotmail.com> - 2015-11-18 22:55 +1300
    Re: EOF issue Alla _ <modelling.data@gmail.com> - 2015-11-18 02:54 -0800
      Re: EOF issue "Osmium" <r124c4u102@comcast.net> - 2015-11-18 06:48 -0600
        Re: EOF issue Lőrinczy Zsigmond <nospam@for.me> - 2015-11-18 16:35 +0100
          Re: EOF issue "Osmium" <r124c4u102@comcast.net> - 2015-11-18 12:58 -0600
      Re: EOF issue Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-18 16:31 +0000
  Re: EOF issue Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-18 11:00 +0000
    Re: EOF issue Alla _ <modelling.data@gmail.com> - 2015-11-18 07:31 -0800
      Re: EOF issue Richard Heathfield <rjh@cpax.org.uk> - 2015-11-18 17:34 +0000
        Re: EOF issue Keith Thompson <kst-u@mib.org> - 2015-11-20 17:57 -0800
      Re: EOF issue Barry Schwarz <schwarzb@dqel.com> - 2015-11-18 11:44 -0800
        Re: EOF issue alla.rashitova@gmail.com - 2015-11-19 00:47 -0800
          Re: EOF issue Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 05:56 -0800
            Re: EOF issue Richard Heathfield <rjh@cpax.org.uk> - 2015-11-19 16:22 +0000
      Re: EOF issue Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-18 21:09 +0000

csiph-web