Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Good C Book?

  1. Jun 24, 2007 #1
    I was wondering if you guys had any recommendations for a good C book (not C++ or C#), they are very heavily outnumbered by C++ books but i wanted to know if you guys knew any that were good in particular for high school level students.
  2. jcsd
  3. Jun 25, 2007 #2
    I recommend "C Companion" by Allen Holub.
  4. Jun 25, 2007 #3


    User Avatar

    C Primer Plus; and the good old The C Programming Language. :)
  5. Jun 25, 2007 #4
    Just to elaborate, KTC is talking about https://www.amazon.com/C-Programmin...373433?ie=UTF8&s=books&qid=1182766101&sr=8-2". I agree with that choice. It's the standard book on C, as in 'standard against which other books are judged'. It's small. Only thing is it might be a bit terse if you've never done any programming whatsoever. But if you've even hacked out something in BASIC, you should be fine with this book. I love it anyway.
    Last edited by a moderator: May 2, 2017
  6. Jun 25, 2007 #5


    User Avatar
    Gold Member

    I second the recommendation of C Primer Plus.
  7. Jun 25, 2007 #6
    I am not recommending any books on C (because I don't know about any, and also because I mainly do C++ rather than C).
    Now if you are a beginner:
    If you go on the link given below, you can download the DEV compiler, which compiles both C and C++.
    The link is: http://www.bloodshed.net/dev/devcpp.html
    Out of the three download options, choose the first one ( 9 MB download).

    The best thing about this compiler is that it has got its own full-fledged tutorial on C, which takes you from the most basic to the most complex.

    Just download the file, install it and run it. Click on File -> New -> Source File.
    This will open a notepad-like file inside the compiler on which you can write the code. After writing the code you can just click on Execute -> Compile and Run.
    To get started on the tutorial, just go to Help -> Help on Dev C++.

    The tutorial will be a good starting point for you, after which you can advance to the books recommended by other members.

    This is how I first learned C. After learning C, it is very easy to adapt to C++ (you will find that yourself).

    However, if you are not a beginner, and just want to increase your field of knowledge of C, then you don't need to do anything written by me in the above lines.

    Mr V
    Last edited: Jun 25, 2007
  8. Jun 25, 2007 #7


    User Avatar
    Science Advisor
    Homework Helper

    The Kernighan and Ritchie book, "The C Programming Language" (2nd Ed) is the classic book for learning C, and will remain valuable as a reference. (The book is generally referred to as the K&R book.)

    The K&R book is probably a bit too intense for first-time programmers, but if you have experience with other languages (especially c-like languages) it's probably a good choice.
  9. Jun 25, 2007 #8
    In my experience, the Internet is the best place to find information about programming languages.
  10. Jun 25, 2007 #9


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The other problem with K&R is that C changed a bit when it became an ANSI standard. It really isn't the best book at all to learn "modern" ANSI C.

    - Warren
  11. Jun 25, 2007 #10
    There is a second edition. And there is a "stamp" on the cover that says ANSI C.
  12. Jun 25, 2007 #11


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Ah, in that case, I may be wrong. I've only seen the first edition, and it's rather archaic.

    - Warren
  13. Jun 25, 2007 #12
    The K&R book is not very instructional. It is not written by educators and I agree with chroot, it is archaic.
  14. Jun 25, 2007 #13
    K&R is a good book to learn C from, but it's not the greatest book to learn how to program from (algorithms, data structures, software design, etc). If all you need is to learn the syntax and structures for C, K&R will do that for you. If you're just starting to learn how to program or need to start from basics, you'll need additional material to learn from.

    K&R may be old, but AFAIK the fundamentals of C haven't really changed all that much. I've had the 2nd ed since it came out and still use it as a reference.
  15. Jun 25, 2007 #14


    User Avatar

    It's worse for C++ than C, but not for these two (possibly among others) languages. Most of the information on the web for these are absolutely rubbish.

    TCPL is fine for C89 (C90). It obviously doesn't contain anything from C99 which C Primer Plus, but then there isn't many books on C published that contain information on C99.

    The problem is not who it was written by, but rather who it was written for. The target audience had been existing programmers, not someone completely new to programming. It's a good book for learning the programming language, not programming. No single book is going to help someone new to suddenly be able to program (with good algorithms, data structures, SE technique etc.).
  16. Jun 26, 2007 #15
    there's a turbo C book i really liked because it was very descriptive about memory function calls and printf formatting....K&R is standard but i didn't really like it because it didn't have many of the things i was looking for ...or maybe i didn't look through it carefuly enough.

    I'll get the book title as soon as i can find the book...

    but whatever text you learn from always look for this statement

    printf("%p",...); Its very important to learn about displayign the pointer address if you don't know how to use a debugger. And its from the turbo C book that i learned the pointer printing.

    Last edited by a moderator: May 2, 2017
  17. Jul 3, 2007 #16
    K&R is really the 'definitive guide' of C. I'd keep a copy in your laptop bag at all times if I were you.

    The book I started to learn by was "C all in one desk reference for dummies" by Dan Gookin. It's not really that exhaustive, but it's enough to make simple programs and get the C bug!
  18. Aug 13, 2007 #17
    The complete reference is the best book for C.
  19. Aug 13, 2007 #18
    I learned from "C The Complete Reference" by Herb Schildt. You might also look at "Teach Yourself C" by the same author. And I learned a lot of basic C++ from "C++ Primer Plus", so I can recommend the author Prata (same as C Primer Plus).
  20. Aug 13, 2007 #19


    User Avatar
    Science Advisor
    Homework Helper

    Unless he has improved a lot Herb Schildt is a disaster.
    His previous books described a language similair to, but definately not 'C'.

    If you have some background in programming the O Reilly Practical C Programming is good. If you like a more example filled slower pace the Wrox Beginning C Programming.
    But if you know programming or other langauges you can't beat K+R.

    Another question is why you would learn just 'C'? Unless you are doing very tiny microcontroller stuff you should start with C++.
  21. Aug 13, 2007 #20


    User Avatar


    C Primer Plus is I heard on the good side, C++ Primer Plus so so.
  22. Aug 14, 2007 #21
    I've always like O'Reilly books, I generally check to see what they have to offer before I check out anything else
  23. Aug 16, 2007 #22
    For a C reference manual I like 'C: A Reference Manual' by Samual Harbison and Guy Steele
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook