Kernighan vs Deitel: Which C Programming Book Is Best for You?

In summary, both books, "C: How to Program" by Deitel and "The C Programming Language" by Kernighan and Ritchie, are highly recommended by the conversation participants. However, Deitel's book is more detailed and has more examples, making it a better choice for someone who is new to C programming. Kernighan and Ritchie's book is concise and serves better as a reference for those with some experience in C. Ultimately, it is up to the individual to choose the book that best suits their learning style and needs.
  • #1
doktorwho
181
6
https://www.amazon.com/dp/0131103628/?tag=pfamazon01-20

https://www.amazon.com/dp/0133976890/?tag=pfamazon01-20

These two books are recommended by my school's C programming course and i can't 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 I am a little indicisive which do you recommend?
 
Last edited by a moderator:
Technology news on Phys.org
  • #2
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.
 
  • Like
Likes doktorwho
  • #3
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
 
  • Like
Likes berkeman, QuantumQuest and doktorwho
  • #4
jedishrfu said:
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.
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
jedishrfu said:
Nope, as I'm not taking your test.
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
 
  • Like
Likes jedishrfu
  • #7
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.
 
  • Like
Likes berkeman
  • #8
doktorwho said:
https://www.amazon.com/dp/0131103628/?tag=pfamazon01-20

https://www.amazon.com/dp/0133976890/?tag=pfamazon01-20

These two books are recommended by my school's C programming course and i can't 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 I am a little indicisive which do you recommend?

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:
  • Like
Likes doktorwho
  • #9
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.
 
  • Like
Likes QuantumQuest, doktorwho and jedishrfu

1. Which book is better for beginners - Kernighan or Deitel?

Both Kernighan and Deitel are excellent choices for beginners as they provide a comprehensive introduction to the C programming language. However, Kernighan's The C Programming Language is considered the "bible" of C programming and is often recommended as the best book for beginners.

2. Do both books cover the same topics?

Yes, both Kernighan and Deitel cover the same topics in their respective books. However, Deitel's C How to Program is more detailed and includes additional topics such as data structures and algorithms.

3. Which book is more up-to-date?

Kernighan's The C Programming Language was first published in 1978 and has since been updated. Deitel's C How to Program was first published in 1983 and has also been updated multiple times. Therefore, both books are considered up-to-date with the latest C programming language features.

4. Are there any significant differences in the teaching style of the two books?

Yes, there are some differences in the teaching style of Kernighan and Deitel. Kernighan's book is more concise and to the point, while Deitel's book is more detailed and includes more examples and exercises. Ultimately, it depends on personal preference and learning style.

5. Can I use both books together to learn C programming?

Yes, you can use both books together to learn C programming. Many programmers recommend using different resources to get a well-rounded understanding of the language. However, it is not necessary to use both books as they cover similar topics and either book can be used as a standalone resource.

Similar threads

  • Programming and Computer Science
Replies
7
Views
684
  • Programming and Computer Science
Replies
17
Views
2K
  • Programming and Computer Science
Replies
16
Views
2K
  • Science and Math Textbooks
Replies
1
Views
544
  • Programming and Computer Science
Replies
1
Views
1K
  • Science and Math Textbooks
Replies
3
Views
911
  • Science and Math Textbooks
Replies
34
Views
3K
  • General Discussion
Replies
1
Views
394
  • Science and Math Textbooks
Replies
4
Views
951
  • Programming and Computer Science
Replies
1
Views
668
Back
Top