1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Best Book to learn C

  1. Feb 8, 2017 #1
    Hear me out on this. I am an absolute beginner to C, i know some Python and i just finihed a month course on Pascal (school currciulum) and we're starting C by the end of February. Even though im a beginner im a fast learner and i want a book that is escalating moderatly or even fast.
    Also what would you suggest to look at at youtube? Any good channels?
    And what do you think about Harvards Intr to Programming using C?
    Thank you guys :) or girls :)
  2. jcsd
  3. Feb 8, 2017 #2


    Staff: Mentor

    Last edited by a moderator: May 8, 2017
  4. Feb 8, 2017 #3


    User Avatar
    Gold Member

    I recommend Deitel's https://www.amazon.com/How-Program-8th-Paul-Deitel/dp/0133976890. It is a big textbook but it is very detailed and beyond teaching the basic features of the language, it has lots of problems and exercises and it teaches good programming and software engineering practices from the ground up. It is recommended to be read in a sequential manner but you can also pick topics that you can't understand well and elaborate. If you like C, by studying the book, you can expand your knowledge beyond what you'll need for your class. If you choose to do so, I would also recommend to take some deep dives into algorithms in C, by studying https://www.amazon.com/Algorithms-Parts-1-4-Fundamentals-Structures/dp/0201314525, a book from the great Bob Sedgewick.

    As for youtube channels, you can find a lot of explanatory videos and choose one if you don't understand some concept, but I think that the most important thing is studying from a textbook, solve problems and exercises and tinkering with code. Also, about Harvard's course you mention, I have not watched the videos but I don't think that there is question about its high quality. The whole thing boils down to how much can you get by watching it, so it's up to you.
    Last edited by a moderator: May 8, 2017
  5. Feb 8, 2017 #4
    I'm not familiar with the Deitel book. I agree with K&R, which is the classic, and also with Sedgewick. I would add to the above Practical C Programming by Qualline, and Expert C Programming by Van Der Linden.

    If you want to learn Windows programming in C, I would learn from The Forger's tutorial on Win32 programming in C. It's freely available. This is much easier than trying to go through Petzold's Programming in Windows when you are still getting used to the language. But I would not mess around with Windows programming until you have mastered K&R at least.

    I recommend using the Mingw32 C compiler which is also free. You can use it to build programs which will run on Windows 10.
  6. Feb 14, 2017 #5


    User Avatar
    Science Advisor
    Gold Member

    The Kernighan and Ritchie book essentially defined C. It is brief and would be good for someone who can already program other languages. In my opinion, it is the only reference worth getting for C.
  7. Feb 15, 2017 #6
    I kind of disagree with previous choices. I'd take this one if I were you: C programming: A modern approach, 2nd edition, by K. N. King
    Turst me, you'll thank me :)
    Another good one is: Pointers on C, by Kenneth Reek. This one was actually my first in secondary school and it opend up to me everything.
    K&R is old, yet classic.
    If I had only two to take, these two would be it.
    For algorithms ? Well, that's a different story :)
    Peace bro.
  8. Feb 16, 2017 #7
    Read this. Mostly about C++, there's a chapter on C.

    Read How Not to Program in C++: 111 Broken Programs and 3 Working Ones, or Why Does 2+2=5986 by Steve Oualline.


    There's also The C Puzzle Book.


    I know of no other language that has books written about it that point out the failures of the language.
  9. Apr 6, 2017 #8
    I would recommend the Tannenbaum book on C
  10. Apr 7, 2017 #9


    User Avatar
    Science Advisor
    Gold Member

    One of the reasons that I like K&R so much is that it is brief. You can get the answer you need by reading one page. I think that a lot of the C programming books are like reading War and Peace -- you have to read a hundred pages scattered throughout the book to understand what they are saying. The same goes for C++ books times 10. But apparently many good programmers prefer the more verbose books.
  11. Jun 29, 2017 #10
    I can´t agree more. King book explains clearly and has a lot of programming exercises. K&R is just a reference manual IMO.
    Another good book is https://www.amazon.com/First-Book-Fourth-Introduction-Programming/dp/1418835560
  12. Jun 29, 2017 #11


    User Avatar
    Gold Member
    2016 Award

    I agree w/ those who specified the white book ("K&R") for anyone not a rank beginner to programming.
  13. Jun 30, 2017 #12
    Yup!! I agree with you.
  14. Jun 30, 2017 #13


    User Avatar
    Science Advisor

    I was taught Pascal in high school in the 80's, but I thought it is not taught any more. :oldconfused:
  15. Jun 30, 2017 #14
    Best book I have seen: C: The Complete Reference by Herbert Schildt.

  16. Jun 30, 2017 #15


    Staff: Mentor

    There is quite a lot of serious criticism of this book by Schildt.

    Although most of the 52 people who reviewed this book gave it high marks, quite a few really panned it. Here are some of the critical comments, taken from the Amazon page on reviews of this book.
  17. Jun 30, 2017 #16
    I have been using the java book by schildt for long, and the c book also I had used for some time. But I didn't find any such inaccuracies. I may be wrong though. :olduhh:
  18. Jun 30, 2017 #17


    Staff: Mentor

    Another person wrote this about Schildt's book:
  19. Jul 1, 2017 #18


    User Avatar
    Gold Member

    I agree to Mark44, reviews by many expert people is a safe indicator for the quality of a book. I have also books of H.Schildt (Java, C++) from more than ten years ago and I think that they suffer from lack of proper organization and several inaccuracies (I don't know about newer editions). This is no kind of defamatory statement and if someone has already a basic knowledge of a programming language, this should be no serious problem but on the other hand in general it is something not happily acceptable for a book and completely unacceptable for a beginner that he / she may not be even aware of this.
  20. Jul 1, 2017 #19
    Get all the books you can possibly find :-)
  21. Jul 1, 2017 #20
    If you already know how to program using Python, you can easily master the basics. You'll just have to familiarise yourself with the syntax first.

    You can easily do this by following online tutorials. I recommend the by a channel called TheNewBoston on YouTube. The tutorial uses Windows but you can easily find out how it can be done on a Linux environment, the programming part will remain unchanged.

    The part that is going to be new is the concept of memory management and pointers. The tutorials do cover that as well.
    And if you really need a textbook, I will recommend Programming with C by Byron Gottfried. It's a part of Schaum's Outline series and gets you started very quickly. I also had to learn data structures during my course and I used Data Structures (Schaum's Outline Series) by Seymour Lipschutz. I think the publishers recently brought a C version of the book.
    Last edited: Jul 1, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Best Book to learn C