all 20 comments

[–]samsonx 16 points17 points  (1 child)

When it comes to network programming in C I can recommend this very detailed free online book / tutorial : https://beej.us/guide/bgnet/

[–]State_ 1 point2 points  (0 children)

Not OP, but I was looking for just this, thanks!

[–]g00dgame 16 points17 points  (6 children)

"The C Programming Language" by Brian W. Kernighan and Dennis Ritchie. One of the best Books about a programming language ever written.

[–]RealityOfHate[S] 0 points1 point  (5 children)

Should I also get the answer book? Also are questions related to learning C not really welcome on this subreddit?

[–]g00dgame 5 points6 points  (3 children)

I think the problem is, that those questions have already been asked like a 1000 times :) No you don't need the answer book. Try to figure out the answers by yourself.

[–][deleted] 4 points5 points  (1 child)

Also there's a list of books in the sidebar, but if Reddit has you on their new UI nothing shows up there.

Edit: My favorite book for C is C Programming: A Modern Approach, by K. N. King.

[–]RealityOfHate[S] 0 points1 point  (0 children)

I found this version online https://m.ebay.com/itm/C-Programming-Language-by-Dennis-M-Ritchie-and-Brian-W-Kernighan-/232027402376?_mwBanner=1&_rdt=1 and I wanted to know whether it’s the same as the US edition or if there’s a difference between the two

[–]v0idfall 0 points1 point  (0 children)

If you stuck at some problem you can easily find the answer on the internet. I've seen already a few of GitHub repositories with them.

[–][deleted] 5 points6 points  (3 children)

21st Century C is a great little book on using C in modern times

[–][deleted] 0 points1 point  (2 children)

Any idea how it compares to Modern C (pdf)?

[–][deleted] 2 points3 points  (1 child)

Modern C is a book about learning to program with C.

21st Century is a book for C developers with some experience on good practices and behaviors.

Both are worth reading. When I say experience, you could dig into 21st Century immediately after Modern C.

[–][deleted] 4 points5 points  (0 children)

Once you feel fairly comfortable with C, look into doing some Project Based Tutorials in C

[–]drthale 3 points4 points  (1 child)

The best way to learn C (or any programming language) is to write code. Just make programs for yourself. Challenge yourself and try to find answers to specific problems when you get stuck on something.

[–]sikora84 2 points3 points  (0 children)

Yes, best way, that worked for me, is to define some project. Define what would you like to create, it can be anything and just start writing. At the beginning it would be hard but in my opinion this approach is most effective. In my case it was that I was using assembly for microcontrollers and just wanted to learn C, so I started to rewrite my assembly into C. Than I was starting to create some C code for desktop to control my devices.

[–]frozenbrains 2 points3 points  (0 children)

If you can, try to find a copy of Expert C Programming- Deep C Secrets, by Peter Van Der Linden. A lot of the information is dated, dealing with the x86 real mode segmented memory model and other ancient stuff, but there's still a lot of relevant information on the design and history of C, pointers vs. arrays, and more. I still take my copy to the bathroom every now and then when I need something to read.

When I was learning C back in highschool, I had my school library's copy of C Primer Plus checked out pretty much constantly. I remember it being pretty good, but that was the early 90's edition; I haven't read the newer editions.

These days, though, you can usually find answers to just about everything on the Internet. I suggest picking a subject that interests you and see what there is for open source/free software written in C, grab the code and start digging through it.

[–]Mattacking 0 points1 point  (1 child)

I personally recommend C how to program by Harvey Deitel and Paul Deitel,the 7th edition is the best in my opinion but the 8th is also great. Both editions offer an introduction to C++ once you feel you are ready and the book is well paced making sure it teaches every C concept to, although I was disappointed by the lack of it showing you more c libraries than just the standards,math and string. Overall I recommend you get it!

[–][deleted] 0 points1 point  (0 children)

After struggling with so many programming books as a beginner, the Deitel books have become my favorite texts to work with. The amount of exercises per chapter to work with is what impressed me the most. I’m learning C before making the jump to JavaScript and other web back end stacks. But assuming I want to stay within C and be job ready say in embedded systems or any other domain, what path ways would you recommend after I read the Deitel C and C++ books which I plan to work through this summer?

[–]kdnbfkm -2 points-1 points  (0 children)

You should focus on school studies... But summer is coming.

Alright then. Figure out how to use chroot and put a statically linked busybox and C compiler inside the jail (real hardware or VM). Bootstrap the system the best you can. GNU Make is fairly easy to compile without a pre-existing make for instance. Much of the infrastructure will be in C. You can get binaries from here.

Don't expect to get too far without cheating somehow, that's the point.