I now understand why my subsequent programs, and those of many in my generation, have been riddled with bugs for 3 decades.
K&R C was best practice in 1980 or so, since then we've learned a lot about C, about what to do and what not to do. If you still program C like it is 1980 then you can't really blame that on a book from 1978.
C Interfaces and Implementations (David R. Hanson)
Expert C Programming (Peter van der Linden)
I never know what to do with comments like this. It's obviously not a beginner's book. At the very least, it assumes that you know C. If your response is "C is a small language. You can learn it by reading <some-other-thing>.", you're admitting that APUE is not a beginner's book. If your response is, "C is a small language. You can learn it by reading APUE itself.", then I call bullshit. Is it theoretically possible, sure. But is it a natural way for a true beginner to learn C? Certainly not.
What do you mean by this? You obviously have NOT read it. I have. I'm telling you it is a beginner book. It does not assume you know C or anything else. It has nothing to do with the size of C. Grabbed it off my bookshelf -- he starts off telling you how to login to a unix system. How advanced can it be?
This is literally the book that taught me the basics of C within a week -- the first language I learned (15 years ago). So it is definitely a beginner book IMO.
Edit: I will say, he does get into some more advanced things toward the end. Which is why I like the book.. he starts off very basic, and by the end, he's covered the basics of interprocess communication, shared memory, etc.
He does not tell you how to log into a UNIX system. He tells you what happens when you log into a UNIX system. (That is a big difference. Compare the first chapter of Kerrigan and Pike's The Unix Programming Environment, which actually does teach about terminals and explicitly talks about how to log in and what a login is -- for a complete beginner.)
Here's the first bit of code, from page 5:
main(int argc, char *argv)
struct dirent *dirp;
if (argc != 2)
err_quit("usage: ls directory_name");
if ((dp = opendir(argv)) == NULL)
err_sys("can't open %s", argv);
while ((dirp = readdir(dp)) != NULL)
It is not a beginner's book.
printf("hello world from process ID %d\n", getpid());
Granted, he does not discuss the syntax or NULL...
Looking through it.. I'll agree it isn't a beginner book. Intermediate at worst though.
However, the second edition of the text is by no means elementary; unless you are conflating beginner literature with comprehensive literature, and the text is certainly comprehensive.
I'll grant you that Chapter 1 is a summary and introduction to the entire book with little challenging or novel material for someone experienced with UNIX and C, but many advanced texts have introductory sections. A large portion of the "The Art of Computer Programming: Fundamental Algorithms" is essentially a review of the elementary mathematics necessary for the analysis of algorithms, but I would never call TAOP a "beginners book"!
That book was a first step for many of the devs that build many of the technologies that support everything we do online today.