August 14th, 2003, 03:48 AM
which book is best?
about learning c for beginner,and easy to read ,easy to understand ,more knowledge besides basic grammar,more knowledge on system?
who know?should be appreciating.
August 14th, 2003, 06:42 AM
This (K&R) is the definative book required for C programming
August 14th, 2003, 01:59 PM
Not is, was. It's seriously out of date now. I don't know if they intend to publish an update for the latest C standard, but I would hope so. Until and unless they do, be aware that the dialect of C in K&R 2 is old hat.
August 15th, 2003, 03:45 AM
o,who is right.....
and ,only one?
BigBadBob,can you tell any?
August 15th, 2003, 05:53 PM
I'd like to see an example of where K&R 2nd edition is seriously outdated. I can think of one - it doesn't mention the long long data type. Whoopee-doo!
Sorry two, // is now a valid comment delimiter in C as well as C++. I am still not convinved!
K&R is concise and accurate, with good technical detail, and no mis-conceptions that occur in many other 'tutorial' books.
However it is not really a tutorial, but can be used in that way, but it does not re-iterate and elaborate in the way some books may.
However IMHO, although it is a larger language, and takes longer to master C++ is better. As a superset of C you can use it either as a procdural language or a OOP language, and it has benefits even before you plunge into OOP, such as stronger type checking, a real boolean data type, built-in type aware dynamic memory allocation, and function overloading.
Certainly learn C, but don't dwell on it, move on to C++ and OOP.
I still recommend K&R, even to C++ programmers, mostly because most C++ books do not deal with the fundamentals of the C subset very effectively or thoroughly.
August 16th, 2003, 03:28 AM
i will think carefully
i will go on
and,will post something when i puzzle again......
August 16th, 2003, 05:05 AM
Clifford, it's hard for me to tell whether you're trolling or whether, for some reason, you think the changes to C since K&R2 are limited to C++ style comments and a long long type. Or maybe you're just mocking me for kicks. Either way, your reply is misleading.
Ok, an example where K&R2 is seriously outdated. Show me a reference in K&R2 to variable length arrays.
K&R2 is out of date. C has moved on, both with the Technical Corrigenda and Amendment introduced in 1995, and the revision to the standard in 1999. If K&R3 appears, great. It hasn't. As far as I can see, K&R2 is stuck in 1988.
August 16th, 2003, 09:33 AM
I did not mean to offend,and appologise if I did. I have learned something interesting, and thank you for that!:o I did not know that C99 supported variable length arrays.
To check if this was true (because I am that cynical), I did a quick search, and while for example gcc supports them, the gcc implemetation is not entirely conformant to C99. I suspect many other compilers either do not support this feature or are too not entirely standards compliant, but I would be genuinely interested if you know more.
I will say this however; I would not say lack of variable length arrays is a big problem in a C compiler. K&R deals with the core language, and most compilers support that core. Leading edge features are likely to either not exist or be less well developed in compilers, leading to portability problems.
Also, I specialise in real-time embedded systems, where such a feature carries risks due to non deterministic memory allocation schemes, and often limited memory resources. If I had the resources to make such a feature safe, I'd probably use C++ in any case.
August 16th, 2003, 10:03 AM
I agree 100% with Clifford on this note. This is why I recommend Beginning Visual C++ 6 by Ivor Horton. It teaches C++ without any OOP for the first 70% of the C++ section of the book (i.e. the first half. the second half deals with MFC). Only after completely teaching almost everything about C++ that doesn't deal with classes, does it get involved in OOP. And when it does, it explains them exactly how they should be explained - classes are data types. I have not seen another C++ tutorial/book/teacher teach them in this manner. It is the first proper method I have seen, and it works very well. Highly recommended.
August 16th, 2003, 11:41 AM
An electronic book based on this book was shipped with MSVC++ 6.0SE. I have a shortcut to it on my Desktop for reference. The electronic version is not MSVC++ specific despite the title. It deals with console apps only so there is no Win API stuff, only ANSI code. Recommended.
August 17th, 2003, 09:52 AM
I think The C programming language (K&R) is still the best book to learn C. Like Clifford said, somethings are outdated, but the book is still really good, and youll learn more about what's going on behind the scenes, then you would with lets say Teach yourself C in 21 days.