The book I learned from was C in 12 lessons by Greg Perry, which I found is still on the shelves to this day, 25 years later. Terrible book.
The bad part is you don’t learn how to do anything other than little bit of simple input and output and loops, and the worst explanation of pointers you can think of.
You can’t do anything in the base language, but that’s just the way C works, you need a platform specific book to learn to do anything worthwhile. This is why the 80’s assembler books were so useful and inspiring.
For what you end up learning in the book you could have actually spent the 24 hours (or less) using something like Python, where you’d be way more productive and hundred times less confused. Actually doing work instead of messing with pointers and fscanf().
Thank you for your response. At this point, I think that I must say that your brain and my brain must operate very differently. To me, messing with pointers is the beauty of all that - and it so easily translates to the assembler-lang-brain.
EDIT: Did you not find the K&R explanation of pointers sufficient?
Today, a generic book on <programming language> will have to spend a significant portion of time explaining platform specifics. Granted, this is really only three platforms these days (Windows, Mac and Linux) but they are significantly different to be a pain to have to explain in a general purpose book.
If you don't plan to learn C++ later, okay, do use a modern version, but if this is a possibility, better start either in completely different language with more clear semantics (pascal was great, maybe some Go or Rust are good now), or the pure subset, which wouldn't add to later confusion but would allow to use more advanced abstractions as needed.
From my experience teaching software engineering to high school students which already passes their algorithms & programming courses, small differences in practices and/or semantics (svn commit vs git commit) is what kills learning progress.
I am glad the C11 committee put more weight on implementibility for C++ compilers than C99 did. Variable-length arrays in particular feel like the C99 committee decided to poke the C++ committee in the eye with a stick. (Given how the C++ world treated C at the time, though, I understand the temptation.) That said, if being compilable as C++ were a hard requirement for C features the world would be a poorer place.
Meaning VLAs that can blow the stack and memory related functions that still track pointer and size in disjoint variables.
Of course, after some time I thought of googling "best book on c lang", and then I discovered K&R.