C Programming: A Modern Approach, 2nd Edition

Author: Kim N. King
All Hacker News 7
This Month Reddit 6


by xSinxify   2019-11-17

No problem at all, glad I could help out. Also, if you're really interested in learning C more thoroughly, some recommended C resources -





https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504 Honestly the only book on general C that I can recommend for someone who wants to learn it deeply.

by xSinxify   2019-11-17

Both posts here (so far) give good advice in terms of learning assembly. I personally used the OpenSecurityTraining course that was linked by /u/miguelhgn to fill in gaps I had in assembly, and I second his advice to check that one out. If that course proves to be too steep, I'd take a step back and learn a bit of C -- so that you can better understand the context of the assembly you would be reading. For free resources, I generally like to recommend https://publications.gbdirect.co.uk//c_book/ or http://users.cs.cf.ac.uk/Dave.Marshall/C/ as they're iso-9899 recommend free resources that cover a pretty good scope when it comes to C itself.

If you'd prefer a more textbook style of reading, and don't mind shelling out money, I generally recommend C Programming: A Modern Approach above anything else that's out there, but it's far from necessary to get this if you find that you learn from the free resources just fine.

As for recognizing patterns in assembly over time as mentioned by /u/poindexter_one, that would best be implemented by using https://godbolt.org/ imo, and starting with smaller C snippets, trying different compilers and optimization levels, and gradually doing the same with more complex code. A good exercise when you start to get good at that, is to also try to do the same thing in the opposite direction (Seeing assembly, and trying to construct C code from it, AKA a part of reverse engineering)

As for your question "Should I learn Assembly language?" depends on where your interests lie, and what you eventually want to learn / be able to do down the line. It's absolutely a good thing to be able to understand though.

by philonoist   2018-11-02
I think K N King serves best for the purpose. Many haven't mentioned this already and I am surprised about that.


by anonymous   2018-04-02
_[…continuation…]_ There are many possible alternatives. I've got [C Programming: A Modern Approach, 2nd Edition](https://smile.amazon.com/dp/0393979504/) which I regard as a decent exposition using C99 (it doesn't cover C11). I have not got many other beginner C books because I learned C long enough ago not to need them any more. (I got King to review it based on other people's suggestions before being willing to recommend it.)
by monaghanboy   2018-01-24
I would recommend https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/.... There's specifically a section on organizing large projects IIRC.
by anonymous   2017-10-22
Yes, this code is full of some very basic errors that show you don’t know the basics of the language. You need to find a good C book (I’ve heard good things about King’s [C Programming: A Modern Approach](https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504/ref=sr_1_1?ie=UTF8&qid=1508067873&sr=8-1&keywords=c+programming+a+modern+approach)). There are some very basic concepts of C you don’t yet understand, and SO is not meant to be a basic tutorial site.
by nonrecursive   2017-08-19
I've really liked http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0...
by AsyncAwait   2017-08-19
I cannot recommend "C Programming: A Modern Approach" [1] enough.

[1] - https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/...

by philonoist   2017-08-19
For a beginner in Programming (not C)

If you Reside in India - SK Srivastava & Bagalurusamy[1]

Else - K N KING[2]

[1] - amazon.in/Programming-ANSI-C-Balagurusamy/dp/933921966X/ & http://www.amazon.in/C-Depth-Deepali-Srivastava/dp/818333048...

[2] - amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504

by Bizkitgto   2017-08-19

I'd start here with the Aalto C Programming MOOC based on K&R.

Then take on Harvard's CS50 book by King to accompany the course.

Finally to really learn C - you should read K&R 's The C Programming Language (the bible for C) at some point and tackle every problem in the book!

by Wiggledan   2017-08-19

C Programming, A Modern Approach 2nd Ed by K.N. King

This book is hands down the best programming book I've seen, and is a good C reference manual as well. It has tons of examples, exercises, figures, etc., and stays digestible and even occasionally entertaining throughout. Just reading the preface should be enough to get you hooked.

Also, C is a great first language, for a multitude of reasons. It might be harder to grasp initially than something like Python, but it gives you a better understanding of what's happening under the hood of your computer. Plus it's the grand-daddy of many popular languages, and so many of its concepts carry to other languages well.