Alan said:
That's a strange way to put it: "spoon feed".
??? That may be a "midwesternism" (USA central region) for being
given information in (small) measured amounts so as to not
overwhelm the recipient.
It is a book written for people who already know how to
program and want to learn C.
True. Doesn't that describe you?
No amount of "brain engaging" could EVER have arrived at the
use of Ctrl-c or Ctrl-d for that program.
True. The keyboard mechanism isn't part of the language. The
standard provides a mechanism to recognize the end-of-file
condition for a /stream/ without requiring that there even /be/ a
keyboard associated with any of those streams.
BTW, on one of my systems Ctrl-Z generates EOF; and on another
Ctrl-X has the same effect. A number of the machines I've
programmed in C have no keyboard at all.
The point you're missing is that the mechanism for *generating*
an EOF condition from a keyboard is /not/ a C language issue and
should be described in other, probably OS, documentation.
*Testing* for the condition within a C program /is/ a C language
issue and should be described in C language documentation.
There was not a single clue that could possibly lead ANYONE to
those keybindings.
Appropriate, if not convenient. The key bindings aren't
determined by (or relevant to) the C standard. BTW, one of the
advantages of becoming familiar with the standard is knowing what
/is/ and what is /not/ part of the language. I'm sorry you had
difficulties.
(and I studied the header files too)
This is evidence that my comment about bindings is accurate.
Unless they already knew at least a high-level language like
sh (that's me).
And even then, whereas I did USE it, I still couldn't relate
it to the text. I thought it was just an "emergency out."
You seem to attach some sort of stigma to novices, as if you
weren't one yourself at some point.
No, I really don't attach any sort of stigma to any stage of
development. Actually, I'm pleased that you're interested in at
least one of the same things that I find fascinating; and I'm at
least a bit envious that you have free access to the human
resources (via the web and usenet) that weren't available to me
when I began. Strange as it may sound, I'd been programming in C
for more than two years before I met another C programmer - and
for more than a decade before I ever heard of usenet.
You were. There was a time when you thought a pointer was a
kind of domestic dog.

Actually, I'd been programming in a number of assembly
languages (and a number of high-level languages) for more than
ten years before I started with C. /Addresses/ were actually a
pretty basic concept, and most of the machines I programmed had
/indirect/ addressing modes - which made pointers and
pointers-to-pointers fairly natural to me.