5 ms·
Best way to learn C in 2019?
What would be a good reference to learn C language (I presume ANSI C) today? It used to be K & R book, not sure if that is still relevant. I'm not looking for a resource that's for programming newbies but for someone who can already program in higher level languages.
- phendrenad2 8y ago1) Get a book on C++ and stop reading once you get to classes and other C++ features. 2) Read these in any order: "The C Puzzle Book", "Deep C Secrets", "Class Construction in C and C++" (shows what C is capable of without touching C++ features).
- CyberFonic 8y agoThe 2nd edition of K&R (ANSI C) is the only enduring tome on my bookshelf. Assuming you have some solid knowledge, that should be all you need. I find reading [John Regehr's blog](https://blog.regehr.org/ https://blog.regehr.org/) is good to get the gist of under-specified behaviours by the various compilers and what to watch out for. Having written that, C programs that I wrote 10-20 years ago, still work without any problems. So unless you are doing some tricky stuff, like kernels or advanced device drivers, I would think that K&R will suffice. Of course, it is always a very good idea to check the compiler's warnings and edit your programs to eliminate them.
- hackermailman 8y ago* K&R Book * Some course/book that includes gdb/compilers/modern style ect https://www.youtube.com/playlist?list=PLpIxOj-HnDsPZIJYO4U9f-xRI8bBadaso https://www.youtube.com/playlist?list=PLpIxOj-HnDsPZIJYO4U9f... which covers http://csapp.cs.cmu.edu/ http://csapp.cs.cmu.edu/ * The SEI CERT C Coding Standard https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Coding+Standard https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Cod... combined with C Traps and Pitfalls http://literateprogramming.com/ctraps.pdf http://literateprogramming.com/ctraps.pdf Really any C book you can find combined w/SEI CERT standard, there's even a functional C book from 1999 https://pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2322038d1ac9ed7.pdf https://pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2...
- bsg75 8y agoI have found 21st Century C to be a fairly current treatment: https://www.oreilly.com/library/view/21st-century-c/9781491904428/ https://www.oreilly.com/library/view/21st-century-c/97814919...
- lsiebert 8y ago21st Century C gives you a fair bit of support in terms of tools that a book that just teaches the language may lack. Knowing how to use makefiles and valgrind and other tools is extremely beneficial, IMHO.
- flukus 8y agoI bought this on your recommendation and have to say how great it is so far, readable, just opinionated enough, reasonably concise and very pragmatic, the exact opposite of every other C book out there. It's not great for completely new programmers but it's fantastic for everyone else. That first chapter alone and the C shebang (https://github.com/RhysU/c99sh https://github.com/RhysU/c99sh) walkthrough put together so many ideas I've never thought or heeard of. It makes C usable in ways that you'd typical use something like python for.
- weRven0m 8y agoGo to 42 https://www.42.us.org/ https://www.42.us.org/
- kotrunga 8y agoI would still start with K & R. If you're solid with everything there, you'll be fine.
- 50 8y agohttp://c-faq.com http://c-faq.com might help too!