Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

A good C programming book?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
PL99
Posts: 22
Joined: 2004-03-05 21:43
Location: Austria

A good C programming book?

#1 Post by PL99 »

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?

User avatar
MarkvD
Posts: 77
Joined: 2004-02-15 21:36
Location: Rhoon, Holland

#2 Post by MarkvD »

many people recomment C Programming Language (2nd Edition) Kernighan and Ritchie:
http://www.amazon.com/exec/obidos/tg/de ... ce&s=books

It's one of the books that is on my list of wannahaves.

denise
Posts: 34
Joined: 2004-02-17 13:39

#3 Post by denise »

With this book a hole new world opened for me but I learned the basicsfrom howtos found all over the net

User avatar
MarkvD
Posts: 77
Joined: 2004-02-15 21:36
Location: Rhoon, Holland

#4 Post by MarkvD »

When you want some more difficult stuff to read try:

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

The complete book can de read online.

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

Re: A good C programming book?

#5 Post by jao »

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

hth

User avatar
JeffS
Posts: 4
Joined: 2004-09-10 21:16

C books

#6 Post by JeffS »

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

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

Re: C books

#7 Post by jao »

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).

User avatar
JeffS
Posts: 4
Joined: 2004-09-10 21:16

Re: C books

#8 Post by JeffS »

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

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

Re: C books

#9 Post by jao »

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.

Guest

Re: C books

#10 Post by Guest »

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

#11 Post by Guest »

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.

User avatar
JeffS
Posts: 4
Joined: 2004-09-10 21:16

Guest posts were actually Jeffs

#12 Post by JeffS »

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
kryptos
Posts: 30
Joined: 2004-10-23 09:12
Location: /home

#13 Post by kryptos »

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).

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

e-book about C

#14 Post by schuler »

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

Pollywog
Posts: 1
Joined: 2005-04-10 20:11

Re: C books

#15 Post by Pollywog »

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.

User avatar
deepsa
Posts: 6
Joined: 2005-06-13 12:21
Location: Behind Blue Eyes
Contact:

#16 Post by deepsa »

Hello Reader,

I got one link for u to download a e-books for the C language :
Feel free to reply:
http://recalentado.com/ebooks/Kernighan ... nguage.pdf

This e-book is written by the creator's of C (so plz read this one)

THanks
Bye
Be Open By SOurce
No One Know what it likes, to be the bad man,
to be the sad man
Behind Blue Eyes
Image

Post Reply