r/osdev • u/[deleted] • Aug 25 '23
Learning C through reading “The C programming language” book, people tell me it’s outdated and old, that I should switch to something like “C, a modern approach”
I’m currently at chapter 4 of the book, functions and have read it up to the reverse Polish notation part. How much is the C I learn from this book different from that book people have told me? I don’t want to feel bored reading a new book because I’ve already read some part of the material. One thing I liked about this was the exercises, do other books have those?
14
Upvotes
7
u/dontyougetsoupedyet Aug 25 '23
Consider the difference in the TOC between King's A Modern Approach and Seacord's "Effective C An Introduction to Professional C Programming". King jumps from an introduction to C straight to formatted input, and earlier than that in chapter 1 presents formatted input functions when "teaching" interacting with user input. It's basically dropping a huge loaf straight onto a reader's eyeball. Seacord's book introduces scanf in the context of interacting with data in a file, "signals.txt", not for interacting with a user typing input. Seacord's book provides context and information about what "reading data" even means. I'm not selling you Seacord's book, I want to point out how A LOT OF teaching material for C uses APIs incorrectly, leading people to drink poisoned water for their introduction to C. Some material, like Beej's C guide even mixes "incorrect" usage of scanf with correct usage of the API, so you might get the idea that the API should be used for trivial things, while really it's intended for heavy lifting.