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

C/++/# Kernighan or Deitel?

  1. Apr 25, 2017 #1
    https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628

    https://www.amazon.com/How-Program-8th-Paul-Deitel/dp/0133976890

    These two books are recommended by my school's C programming course and i cant decide which to buy. I have a big test in about a month in which i will have 2 hours to write 3 programs and i need to improve my C programming skills. I primarily want a book that explains really well and has lots of examples and problems to do. These two get the greatest praise but since im a little indicisive which do you recommend?
     
    Last edited by a moderator: May 8, 2017
  2. jcsd
  3. Apr 25, 2017 #2

    jedishrfu

    Staff: Mentor

    Both are good but Kernighan's is a classic of brevity at least it was in the first edition. This edition has 270+ pages vs Deitel's at 1000+ pages.

    How much time do you have to read through them?

    I'd go with brevity and do as many problems as you can. Also pay particular attention to pointers which are datatype specific, structs and unions. They are all very important to do effective C programming.
     
  4. Apr 25, 2017 #3

    jim mcnamara

    User Avatar

    Staff: Mentor

    They are both good. Deitel's book is more expensive, but covers lots of details. If you plan on using C extensively in the future consider Deitel's. Also consider learning the C-11 standards by heart. Undefined behavior can make your life miserable if you don't understand it.

    C11 - go here https://en.wikipedia.org/wiki/C11_(C_standard_revision)
    Download N1570 Committee Draft

    ISO-IEC 9899:2011 is the actual standard, but costs about $US300 last time I looked. N1570 is what most people refer to. I have one in the Desktop folder of Windows
     
  5. Apr 25, 2017 #4
    The test which i described is in a month and deals with topics up to Pointers and the final is in two and a half months and deals with topics beyond pointers. Does that change your answer?
     
  6. Apr 25, 2017 #5

    jedishrfu

    Staff: Mentor

    Nope, as I'm not taking your test.
     
  7. Apr 25, 2017 #6
    Haha, i meant is that enough time to read through the bigger one without confusing the hell out of me xD :D but thanks i decided to go for the Deitel's
     
  8. Apr 25, 2017 #7

    jedishrfu

    Staff: Mentor

    Its always best to pick your own book. My niece always told me that books speak and you'll know which onee is right.

    I think you nade a good choice.
     
  9. Apr 25, 2017 #8

    QuantumQuest

    User Avatar
    Gold Member

    The two books are quite different in their philosophy. They are undoubtedly both very good. I have used Deitel's books (C, C++, Java, Internet and WWW) for many years extensively and they really worth their price and time to spend studying. They are full of details, exercises, problems and projects but need patience and devotion, in order to give you their full potential. I highly recommend them in general and particularly for your specific case. On the other hand, no one can doubt the great book by Kernighan, I've also used it but it is - as already has been mentioned, concise enough so it needs you to fill some details. It surely can be done either.
     
    Last edited by a moderator: May 8, 2017
  10. Apr 25, 2017 #9

    Mark44

    Staff: Mentor

    For someone starting out, I would advise a book with more details and examples, so I echo the opinions in this thread favoring Deitel. IMO K & R (Kernighan and Ritchie) is a great reference for someone with some experience, but not as good if you're new at C.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted