Found in 5 comments on Hacker News
redis_mlc · 2021-04-23 · Original thread
Just learn C by reading and working through the K&R book. (It's one of the best CS books ever written.)

https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...

Also, there's nothing magical about pointers - scripting languages use "handles", which is the same thing except they're read-only to the end-user programmer.

The real challenge with C is multi-threaded programming, so don't do that if you don't need it.

gjkood · 2020-03-08 · Original thread
To start with, "The C Programming Langauge", Kernighan & Richie (K & R) [1]. Find the latest edition that you can buy.

I think the primary topic to master in C is pointers. This is where most falter. It takes a few years to "master" (if we ever do). Here I would recommend "Understanding and Using C Pointers", Richard Reese. [2]

If you are interested in networking, any of the classic "TCP/IP Illustrated Vols I/II/III", W. Richard Stevens, [3] contain a ton of C code to implement components of TCP/IP.

If you are interested in Graphics, then "Graphics Gems", Andrew Glassner [4] is a good source.

"An Introduction to GCC", Brian Gough, [5] to understand the tooling and its various bells and whistles.

My learning swimming by jumping into the deep end of the pool experience was realized by learning Windows Programming using the Charles Petzold book and navigating through Microsoft Foundation Classes in the late 80s/early 90s. The state of the art in tooling wasn't that great in those days and I spent months with the book to get things going. This was done after I had built a foundation with K&R and a decent amount of Unix network programming.

I see a lot of the other posts recommend more modern books. But you still need to build your foundation on C and Pointers in particular.

Good luck on your journey.

[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...

[2] https://www.amazon.com/Understanding-Using-Pointers-Techniqu...

[3] https://www.amazon.com/TCP-Illustrated-Protocols-Addison-Wes...

[4] https://www.amazon.com/Graphics-Gems-Andrew-S-Glassner/dp/01...

[5] https://www.amazon.com/Introduction-GCC-GNU-Compilers/dp/095...

pritovido · 2020-03-08 · Original thread
C is a very simple language. I have used just the official old book to create a compiler for it:

https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...

The best thing you can do is finding some open source code that interest you, read it and write it.

For example, I write my own controllers for CNCs, and there are lots of code for controlling stepper motors out there. I also learned OpenGL and sockets this way long time ago.

On the other hand, C is a terrible language for any big project unless you automate it some way.

I use mostly lisp in order to write C code automatically. C is too low level for writing any substantial code. Lisp has things like Macros(nothing to do with c macros) that can make you write code 10x, to 50x faster easily.

whydoyoucare · 2019-12-03 · Original thread
As far as I know, prices of books differ between rich and developing nations. For e.g., The C Programming Language that costs $50 in the US [1], is sold for Rs. 259 (~$4 US) in India. I believe that is the case with most "economy editions" specifically targeted at developing nations. It certainly isn't an "year's wages".

While I do understand your point, it still does not justify encouraging modern-day Robinhoods' and breaking the law.

[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig... [2] https://www.amazon.in/Programming-Language-Kernighan-Dennis-...

whydoyoucare · 2019-09-18 · Original thread
The C language can be best learned from "The C Programming Language, 2nd Ed" [1], also known as "K&R book". Pair it with excellent notes by Steve Summit [2], and you don't need any other book to master C.

[1] https://www.amazon.com/Programming-Language-2nd-Brian-Kernig...

[2] https://www.eskimo.com/~scs/cclass/notes/top.html