Learn C: Best Book for Beginner & Harvard Intro to Programming

In summary: The C Programming Language, by Brian W. Kernighan and Dennis M. Ritchie. It is a classic and essential for anyone who wants to learn C programming. It covers all the basics of the language and provides helpful examples and exercises. It is highly recommended for beginners and experienced programmers alike.
  • #1
doktorwho
181
6
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 I am a beginner I am 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 :)
 
Physics news on Phys.org
  • #3
doktorwho said:
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 I am a beginner I am 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 :)

I recommend Deitel's https://www.amazon.com/dp/0133976890/?tag=pfamazon01-20. 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/dp/0201314525/?tag=pfamazon01-20, 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:
  • Like
Likes doktorwho
  • #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.
 
  • #5
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.
 
  • Like
Likes noir1993, Gayathri MK, ibkev and 1 other person
  • #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.
 
  • Like
Likes carlitos_30
  • #7
doktorwho said:
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 I am a beginner I am 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 :)
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.

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

There's also The C Puzzle Book.

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

I know of no other language that has books written about it that point out the failures of the language.
 
  • #8
I would recommend the Tannenbaum book on C
 
  • #9
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.
 
  • Like
Likes vanhees71 and jedishrfu
  • #10
discoversci said:
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.
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/dp/1418835560/?tag=pfamazon01-20
 
  • #11
I agree w/ those who specified the white book ("K&R") for anyone not a rank beginner to programming.
 
  • Like
Likes noir1993
  • #12
FactChecker said:
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.
Yup! I agree with you.
 
  • #13
doktorwho said:
i just finihed a month course on Pascal (school currciulum)
I was taught Pascal in high school in the 80's, but I thought it is not taught any more. :oldconfused:
 
  • #14
doktorwho said:
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 I am a beginner I am 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 :)
Best book I have seen: C: The Complete Reference by Herbert Schildt.

http://www.amazon.com/dp/0070411832/?tag=pfamazon01-20
 
  • #15
Wrichik Basu said:
Best book I have seen: C: The Complete Reference by Herbert Schildt.
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.
From Wikipedia:-------------
Schildt's books have a reputation for being written in a clear style, at least at first glance. Their technical accuracy has been challenged by reviewers, including ISO C committee members Peter Seebach and Clive Feather, Steve Summit, author of the C FAQ, and numerous reviews in C Vu from the ACCU.

I recommend you do not use any Herbert Schildt book to learn or reference the C programming language. Instead, I suggest you go straight to the source and use "The C Programming Language" (Second Edition) by Kernighan and Ritchie, aka "K&R".

Also highly recommended by competent programmers are "C: A Reference Manual" by Harbison and Steele, and "C Programming: A Modern Approach" by K.N. King. All of these are good books for beginning C programmers.

Schildt makes numerous errors.
One example:
printf("%f", sizeof f);
Clearly wrong: sizeof f has does not have type double.
Another example:
/* Write 6 integers to a disk file. */
void put_rec(int rec[6], FILE *fp)
{
int len;
len = fwrite(rec, sizeof rec, 1, fp);
if (len != 1) printf("write error");
}
Wrong again; rec is converted to a pointer to int, rather than an array of 6 ints, because it is in the parameter of a function (try it if you don't believe me).

After purchasing three books written by Herbert Schildt, I have to conclude that I am not a fan of this authors' work. While his efforts yield a lot of information, often the book is heavily unorganized and suffers from absence of often basic-yet-critical information.
 
  • Like
Likes QuantumQuest
  • #16
Mark44 said:
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.
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:
 
  • #17
Another person wrote this about Schildt's book:
This book is to be avoided at all costs, and is unfortunately typical of most modern C books.
 
  • #18
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.
 
  • #19
Get all the books you can possibly find :-)
 
  • #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:
  • #21
awholenumber said:
Get all the books you can possibly find :-)
Seriously? Do you really think ANYONE is going to use all of the dozens of C books out there?
 
  • #22
We had computer oriented numerical methods in C programming language in our syllabus , so i went through at least 5 books , lots of online materials on C .
Some books are very minimal like the Official version , The C programming Language. By Brian W. Kernighan and Dennis M. Ritchie
So , When you have to deal with a syllabus like this ,
https://www.amazon.com/dp/0538733519/?tag=pfamazon01-20

You have to refer a lot more books .

You can learn a lot from here .

Dev C++ compiler
http://www.codewithc.com/category/c-tutorial/
http://www.codewithc.com/category/projects/
 

FAQ: Learn C: Best Book for Beginner & Harvard Intro to Programming

1. What is the best book for beginners to learn C?

The best book for beginners to learn C is "C Programming: A Modern Approach" by K.N. King. It covers all the key concepts of the language and provides numerous coding exercises for practice.

2. Is "Learn C" suitable for someone with no prior programming experience?

Yes, "Learn C" is suitable for someone with no prior programming experience. It starts with the basics of programming and gradually introduces the concepts of C, making it easy for beginners to understand.

3. How is "Learn C" different from other C programming books?

"Learn C" is different from other C programming books in its approach. It focuses on hands-on learning and provides real-world examples and exercises to reinforce the concepts. It also includes a section on debugging, which is often overlooked in other books.

4. Can "Learn C" be used as a supplement to the Harvard Intro to Programming course?

Yes, "Learn C" can be used as a supplement to the Harvard Intro to Programming course. It covers similar topics and provides additional exercises for practice. However, it is important to follow the course curriculum and use "Learn C" as a reference guide.

5. Does "Learn C" cover advanced topics in C programming?

Yes, "Learn C" covers advanced topics such as pointers, structures, and file handling. It also includes a section on best practices and coding standards to help improve the quality of your code. However, it is recommended to have a strong foundation in the basics before diving into advanced topics.

Back
Top