10

Possible Duplicates:
What’s a really good book to learn C?
Best book and environment to start learning C in?

I've been trying to learn C through K&R and I found the book to be a bit difficult.

I couldn't grasp why and assumed that perhaps I myself may be stupid (I hope this isn't true!). A bit discouraged, I skimmed through my roommate's book on Java that he bought for a course and it seemed many times easier to read and understand.

Perhaps it is the fact that the book is around ~800 pages as opposed to K&R being a brief ~150 pages. I do not know the exact reason why I cannot read K&R, but I do know that I wish to try another book. Could anyone suggest a book that I should pick up to learn C?

I don't mind length as long as the book is easy to understand, straight to the point, and willing to give the full details rather than brief, vague descriptions.

2

A good companion reference to K&R is Harbison & Steele's "C: A Reference Manual". Like K&R, it's brief and to the point, but I found that it filled in some gaps. It's a reference manual, not a tutorial, so there isn't any "how-to" material, but it's organized in a clear, bottom-up manner.

2

C for dummies
alt text

Seriously. Check Amazon reviews. It's best C book on Amazon by readers opinion.

1

Deitel & Deitel 'How to program in C' is great, complete and takes you from beginner to advanced issues.

1

Take a look at Applications Programming in Ansi C. It's a great, comprehensive book that's full of examples and exercises for you to try.

1

Here are a set of books written by this guy from India called Yeshwant Kanetkar. His books are amazingly simple to read. I used it primary to get the basic concepts and used K&R for getting deeper.

Let us C

Data Structures Through C

Understanding Pointers in C

0

I like Stephen Kochan's programming books (more specifically his Objective-C book) but his C book has very good ratings as well: http://www.amazon.com/Programming-3rd-Stephen-G-Kochan/dp/0672326663/ref=ntt_at_ep_dpi_2

It might be helpful to know what environment and what ultimate goal you have for programming in C since there are beginner C books for all types of scenarios.

You might get a more structured learning experience by learning C++ first and then transitioning into C. I recommend this book on data structures, which will help you understand memory management by constructing data structures from scratch.

0

C Programming: A Modern Approach

alt text

Use in my undergraduate course. A lot of exercises with C.

0

I myself didn't have an official book/class that taught me C. Instead I was enrolled in a Unix Development class. My class, as opposed to "teaching you C", helped me understand the Unix environment. Secondary to that was creating programs that showed my understanding of the Unix environment, and this is really where I learned C.

I came into the class without any experience in C/Unix and it was very daunting/scary thinking of how difficult it was gonna be for me to pass the class. I was worried about learning the Unix environment as well as C at the same time and immediately felt swamped with work once I got my syllabus. But what I quickly found is that looking at and studying the Unix environment really taught me C, without me having to do any additional C "learning." This is because I learned how to use a system and problem solve in that system as opposed to learning a language and problem solve for a given problem. I think this style of learning helped me understand any language better than any others I have learned, and has made me "feel" like an expert in C (even though I am far far from it).

So with all this being said maybe you ought to look at learning something more "fundamental/conceptual" (IE Unix Environment or Network/Socket programming) as opposed to learning C. I never did have any official C textbook for my class but what I did have was the manual/refrence called "Advanced Programming in the UNIX Environment" by the Addison-Wesley Professional Computing Series. I also have the "Unix Networking Programming" by the same group. I swear and love these books. If I haven't been able to find something on Google/manuals with in five minutes these books have always provided me answers.

They explain how aspects/concepts of the system work and show all the commonly used function calls with those aspects/concepts. They also provide many examples bits of code that show how they are actually used followed by through analysis of what is actually going on with that bit of code.

Also, I am not trying to discourage you from learning just C. This is only my feelings from my experience. If you want to learn just C I don't think these books would satisfy what you are looking for.

0

Expert C Programming - Deep C Secrets by Peter Van der Linden - Use that in conjunction with K&R which is deemed a classic, it will help you unravel the mysteries...above all, never give up on it! Once it clicks, you'll have it for life! :)

Edit: There is another excellent book that I would recommend as it's unusual in the sense of the word that the illustrations are used to make this easy to understand...Illustrating C (ANSI/ISO) by Donald Alcock.

Best of luck with learning C! :)

Hope this helps, Best regards, Tom.

0

First: C is not a good choice for your first programming language. You will have a far easier time if you learn the concepts in some other language, and then transfer that knowledge to C. My personal recommendations for language would be PASCAL or Oberon, using Nicklaus Wirth's books.

If you are already a competent programmer in some other language or languages (FORTRAN, PASCAL, Oberon, Ada, LISP, SNOBOL, COBOL, PL/1, even BASIC), and you just need to learn C, then Leendert Ammeraals's "C for Programmers" should be what you need.

0

I ? C for Engineers

0

If you have some programming experience, Pointers on C by Ken Reek is great. I had him as a professor in college, and this book is the best introduction to C I have found. Great examples and really well worded explanations.

0

"Absolute Beginner's Guide to C"

Absolute Beginner's Guide to C

http://www.amazon.com/Absolute-Beginners-Guide-C-2nd/dp/0672305100/

0

I haven't examined carefully but I like Bruce Eckel's work so I am going to suggest you consider Thinking in C.

0

I share your experience with K&R. In my programming career, I've returned to C twice from other systems/languages. The big advantage of K&R is that it is concise. Its drawback is all of the fast and loose techniques it illustrates with very few good/useful code examples.

So, here is my "minimalist library" for C:

If you don't know programming at all, the Deitel & Deitel "How to Program in C" is probably all you need. It has everything and the kitchen sink in there. But you will need to do the exercises and should try to get feedback on your solutions from a experienced programmer. To fully use it, you will need to read it several times, first focusing on the main text, then on the tips/traps parts, and finally on the engineering practices.

If you know how to program already, that is, are not learning programming concepts, here is my absolute must-be-on-the-shelf list. All of these fit the "small is beautiful" approach (they are all under 350 pages so there's not a lot of fluff). They go from introductory level to advanced C programming.

  1. "C for Professional Programmers, 2nd Ed," by Keith Tizzard.
  2. "C traps and Pitfalls," by Andrew Koenig.
  3. "Advanced C Programming by Example," by John W. Perry.
  4. "Expert C Programming: Deep Secrets," by Peter Van Der Linden.

The first two come out of the K&R C era but are much better as both learning and reference books. Every concept Tizzard presents comes with sample code.

Lastly, the best way to learn how to code is to read existing code. Don't get caught up on coding style instead focus on how the code solves the problem.

0

C in 5 hours: This site really helped me understand C quickly. I knew C++ and programming from before, but it got me started really fast. Mind you, it is very basic. It's just to get you up and running. You won't find complex stuff there. Also, the site's background is red, text is black (!) which makes reading awfully difficult. I advise you to copy the text and read it somewhere else if possible.