If I had been thick enough to declare c as an unsigned char, it would have taken a good bit more than 50% of the time, and wouldn't have worked at all. On Fri, May 15, 2020 at 4:02 PM wrote: > Unfortunately, if c is char on a machine with unsigned chars, or it’s of > type unsigned char, the EOF will never be detected. > > > > > > > > > - while ((c = getchar()) != EOF) if (c == '\n') { /* entire record is > now there */ > > >