A good C programming book?

Need help with C, C++, perl, python, etc?

A good C programming book?

Postby PL99 » 2004-03-05 21:49

Howdy folks

I'm just starting to learn the basics of the C language. But all the information is comming from the internet. I think you would learn it better when I have a book that starts with the verry beginning and takes it a level higher step by step.

Do you know such a book?
PL99
 
Posts: 24
Joined: 2004-03-05 21:43
Location: Austria

Postby MarkvD » 2004-03-06 07:16

many people recomment C Programming Language (2nd Edition) Kernighan and Ritchie:
http://www.amazon.com/exec/obidos/tg/detail/-/0131103628/qid=1078556900/sr=1-1/ref=sr_1_1/104-1285674-8304711?v=glance&s=books

It's one of the books that is on my list of wannahaves.
User avatar
MarkvD
Site admin
 
Posts: 94
Joined: 2004-02-15 21:36
Location: Rhoon, Holland

Postby denise » 2004-03-06 12:38

With this book a hole new world opened for me but I learned the basicsfrom howtos found all over the net
denise
 
Posts: 34
Joined: 2004-02-17 13:39

Postby MarkvD » 2004-03-07 07:56

When you want some more difficult stuff to read try:

http://www.faqs.org/docs/artu/

The complete book can de read online.
User avatar
MarkvD
Site admin
 
Posts: 94
Joined: 2004-02-15 21:36
Location: Rhoon, Holland

Re: A good C programming book?

Postby jao » 2004-09-14 21:33

I've found Hanson's 'C Interfaces and Implementations' (Addison Wesley) an excellent book too.

hth
jao
 
Posts: 3
Joined: 2004-09-14 21:22

C books

Postby JeffS » 2004-09-21 21:14

If you are brand new to C or are relatively new to programming, it's best to start off with a good beginner's primer type book. The "For dummies" books and "teach yourself" books are good for this purpose. Books by Herb Schildt are also good - easy to understand, yet giving thorough coverage.

Then once you are familiar with C and can write some basic programs, then move onto "The C Programming Language". Many people, including programmers of all types and levels, consider this the best programming book, ever, of any kind. This book is indeed incredible, being chaulk full of information and wisdom. You can learn not only the ins and outs of C with this book, but you also learn about programming in general, including data structures. It also helps that this book is by the creators of the C language.

You should also learn OOP, and learn C++. An outstanding starter book is "Accelerated C++". This book takes a top down approach, and has you learning higher level concepts and the standard template library right off the bat. It also teaches the language in the context of solving real world problems, so what is presented sinks in.

Once you finish "Accelerated C++", move on to "The C++ Programming Language", by Bjarne Stroustrup, the creator of C++. This is not a beginning book, but one aimed at intermediate and above programmers who already have a working familiariy with C++. But it is the bible for C++, and C++ is presented in the context of implementing programming techniques and paradigms, as well as implementing sound design principles, and includes tons of invaluable advice. And this book thoroghly covers every aspect of C++.
"There are only two kinds of programming languages: those people always bitch about and those nobody uses. " - Bjarne Stroustrup
User avatar
JeffS
 
Posts: 4
Joined: 2004-09-10 21:16

Re: C books

Postby jao » 2004-09-21 22:03

JeffS wrote:If you are brand new to C or are relatively new to programming, it's best to start off with a good beginner's primer type book. The "For dummies" books and "teach yourself" books are good for this purpose. Books by Herb Schildt are also good - easy to understand, yet giving thorough coverage.


IMO, Schildt books are among the *worst* books on C ever published, and would eagerly discourage their reading, specially by beginners. It's common lore, for instance, that his annotated ANSI C is only worth the odd pages (which contain the standard verbatim; his comments are in the even ones).
jao
 
Posts: 3
Joined: 2004-09-14 21:22

Re: C books

Postby JeffS » 2004-09-21 23:37

jao wrote:
IMO, Schildt books are among the *worst* books on C ever published, and would eagerly discourage their reading, specially by beginners. It's common lore, for instance, that his annotated ANSI C is only worth the odd pages (which contain the standard verbatim; his comments are in the even ones).


I'm curious as to why you think this. I have Schildt's "C++ The Complete Reference" from Osborne/McGraw Hill. It is an excellent book. It is very easy to understand, has excellent examples, it's very well organized, has very thorough coverage of most of the major concepts, and it has clear, concise, newbie friendly prose. I would not hesitate one single bit recommending this book to anyone new to C/C++, and intermediate programmers as well.

My own C/C++ book/study path, which has been very very successful for me (I am now very comfortable and quite productive with C/C++), has been as follows:

1. Beginning/Primer - "C++ The Complete Reference" by Herb Schildt
2. C more in depth - "The C Programming Language" by Kerrigan and Ritchie
3. OOP/C++/STL starting - "Accelerated C++" by Koenig and Moo
4. C++ in depth - "The C++ Programming Language" by Bjarne Stroustrup

I've also taken classes in C, Data Structures in C, and Win32 API in C at the local JC, which have helped tremendously.

C and C++ are difficult languages to master, but this path has been very valuable to me in that cause.

And Herb Schildt's "C++ The Complete Reference" was an intragal part of that process, and Herb Schildt is an outstanding writer, particularily for the newbie or intermediate programmer. He really understands the perspective of someone new to the language, and makes it easy for that perspective.

On the flip side of the coin, I would tell a newbie to avoid Stroustrup's book, because it is not newbie friendly. It's like learning martial arts from Bruce Lee. You should first take karate lessons from your local strip mall mom and pop karate school and get comfortable, before you move up to the master. Herb Schildt is an outstanding "strip mall / mom and pop karate school" instructor. Stroustrup is Bruce Lee.
"There are only two kinds of programming languages: those people always bitch about and those nobody uses. " - Bjarne Stroustrup
User avatar
JeffS
 
Posts: 4
Joined: 2004-09-10 21:16

Re: C books

Postby jao » 2004-09-22 00:26

Well, it's been years since i read Schildt, but i remember his books being full of simply wrong statements made in the most reassuring prose. For a beginner, most of them pass unadverted, and one ends up with a lot of wrong concepts. See, for instance,

http://www.lysator.liu.se/c/schildt.html
http://herd.plethora.net/~seebs/c/c_tcr.html

or the reviews of his books in the ACCU site (a great place to find good advice on C/C++, btw). The man even has an entry in the jargon file:

http://www.catb.org/jargon/html/B/bullschildt.html

So, yes, i agree that Schildt "really understands the perspective of someone new to the language, and makes it easy for that perspective", to use your words, but by way of making the same mistakes a newbie would fall into!

FWIW, I learned C with K&R, and Stroustroup's was my first C++ book. I'd do it again: it's hard work, but it pays off. I've also found Scott Meyer's and Herb Sutter's books immensely useful to really understand C++, and Alexandrescu's 'Modern C++' showed me that i had just scratched the surface of C++ programming. Finally, let me mention Plauger's 'The C standard library' as an excellent demonstration of how to write good C code.
jao
 
Posts: 3
Joined: 2004-09-14 21:22

Re: C books

Postby Guest » 2004-09-22 17:37

jao wrote:Well, it's been years since i read Schildt, but i remember his books being full of simply wrong statements made in the most reassuring prose. For a beginner, most of them pass unadverted, and one ends up with a lot of wrong concepts. See, for instance,

http://www.lysator.liu.se/c/schildt.html
http://herd.plethora.net/~seebs/c/c_tcr.html

or the reviews of his books in the ACCU site (a great place to find good advice on C/C++, btw). The man even has an entry in the jargon file:

http://www.catb.org/jargon/html/B/bullschildt.html

So, yes, i agree that Schildt "really understands the perspective of someone new to the language, and makes it easy for that perspective", to use your words, but by way of making the same mistakes a newbie would fall into!

FWIW, I learned C with K&R, and Stroustroup's was my first C++ book. I'd do it again: it's hard work, but it pays off. I've also found Scott Meyer's and Herb Sutter's books immensely useful to really understand C++, and Alexandrescu's 'Modern C++' showed me that i had just scratched the surface of C++ programming. Finally, let me mention Plauger's 'The C standard library' as an excellent demonstration of how to write good C code.


While I will never excuse Schildt or any other author for large amounts of techical errors in their books, errors in programming books, particularily of the "starter/newbie" variety, are quite common. Just peruse the reviews of various programming books over at Amazon, and you'll see what I mean. Your link to the site detailing the errors in Shildt's "C The Complete Reference" gives an impression of sloppiness and an unexectpable amount of errors. However, some of the errors pointed out are of the "incomplete, semantic" variety, where the compiler of the list is mostly nit-picking, such as:

"Page 19

In general, negative numbers are represented using the two's complement approach...

This is not a C feature. It is a common implementation, but it is specifically not required. (Binary is, but one's complement is not unheard of.) "

From the perspective of the newbie (who is only trying to learn and understand and be productive), it is immaterial wether it's an actual C feature or a common implementation. The newbie just wants to get up to speed as quickly as possible, and can worry about exact language definitions later. Now, it is preferable that the newbie learns things exactly as they are right off the bat, to avoid potential future errors or bad habbits. But that usually comes in time anyway.

Also, "The Complete Reference" series of books, like many other big thick tomes, usually has upwords of a 1000 pages. And the errors detailed in the link is actually a tiny fraction of the overall output - the link lists 20 errors in a book that's a good 3 inches thick, and probably a good 1000 pages. This would still represent an acceptably high accuracy level. Even Stroustrup, who's book is painstakingly edited, has openly admitted to errors in various editions of his book.

Again, I don't excuse errors, but they happen even to the best of them, including Stroustrup. I'm sure Stroustrup is far more accurate and detailed then Schildt, but Schildt is far more easy to understand.
Guest
 

Re: C books

Postby Guest » 2004-09-22 18:02

jao wrote:
FWIW, I learned C with K&R, and Stroustroup's was my first C++ book. I'd do it again: it's hard work, but it pays off.


I agree with this. It probably does pay off in the long run to dive into the highest quality books first, even if the going is tough at first. I guess is depends on the person - just how gentle and/or gradual they prefer their introduction to the language to be.

FWIW, these two books you mentioned - K&R and Stroustroup's - are my two all time favorite programming books, any language. The quality, the information, the thoroughness, the terseness and efficiency (just like the languages they are describing) and especialyl the wisdom that these two books feature is simply amazing. With these books, you are truely being taught by the highest of masters.

However, I don't regret starting with Schildt (plus classes at the local JC). The basic stuff I learned from Schildt made me prepared to absorb and understand the stuff from K&R and Stroustrup. Both K&R and Stroustrup make a lot of assumptions about the reader and what they already know. I would have understood the stuff from K&R and Stroustrup anyway (eventually), but it was much easier with having read Schildt first, and made the understanding deeper.
Guest
 

Guest posts were actually Jeffs

Postby JeffS » 2004-09-22 18:49

FYI - the previous two "Guest" posts were actually me. I had forgot to login first. :lol:
"There are only two kinds of programming languages: those people always bitch about and those nobody uses. " - Bjarne Stroustrup
User avatar
JeffS
 
Posts: 4
Joined: 2004-09-10 21:16

Postby kryptos » 2004-10-23 12:27

Well, for the dutch people here, they can try this: http://pascal.nedlinux.nl/documentatie/clinux.txt. It hasn't been translated to english (yet).
User avatar
kryptos
 
Posts: 34
Joined: 2004-10-23 09:12
Location: /home

e-book about C

Postby schuler » 2005-03-05 01:28

Hi,

if you prefer online material covering C, use this e-book:

http://www.its.strath.ac.uk/courses/c/index.html

Cheers,

Steffen Schuler
schuler
 
Posts: 1
Joined: 2005-03-04 18:31

Re: C books

Postby Pollywog » 2005-04-10 20:16

JeffS wrote:If you are brand new to C or are relatively new to programming, it's best to start off with a good beginner's primer type book. The "For dummies" books and "teach yourself" books are good for this purpose. Books by Herb Schildt are also good - easy to understand, yet giving thorough coverage.


I have two of the Schildt books and I found that I was unable to compile some of the examples in the book because some of the header files referred to in the book are part of C++ and not C. I learn best by following examples, so this was a drawback for me.
Pollywog
 
Posts: 1
Joined: 2005-04-10 20:11

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

fashionable