#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    31
    Rep Power
    12

    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.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    London
    Posts
    349
    Rep Power
    13
    This (K&R) is the definative book required for C programming
  4. #3
  5. No Profile Picture
    status unknown
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    262
    Rep Power
    12
    Originally posted by rendy
    This (K&R) is the definative book required for C programming
    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.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    31
    Rep Power
    12
    o,who is right.....
    and ,only one?
    if not
    BigBadBob,can you tell any?
  8. #5
  9. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,109
    Rep Power
    1802
    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.

    Clifford
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    31
    Rep Power
    12
    ok.....thanks
    i will think carefully
    i will go on
    thanks
    and,will post something when i puzzle again......
  12. #7
  13. No Profile Picture
    status unknown
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    262
    Rep Power
    12
    Originally posted by clifford
    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!

    Clifford
    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.
  14. #8
  15. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,109
    Rep Power
    1802
    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.

    Clifford
  16. #9
  17. jasondoucette.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    378
    Rep Power
    12
    Originally posted by clifford
    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.
    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.
  18. #10
  19. Contributing User

    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,109
    Rep Power
    1802
    Originally posted by Jason Doucette
    This is why I recommend Beginning Visual C++ 6 by Ivor Horton.
    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.


    Clifford
  20. #11
  21. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12
    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.

IMN logo majestic logo threadwatch logo seochat tools logo