a good C book

Discussion in 'C Programming' started by Rudra Banerjee, Jan 31, 2013.

  1. Hello friends,
    I *really* dont want to flame a war here. But it will be helpful for me if you can suggest a good book for me.
    I am not a novice programmer, using fortan for ~10 years now. But from such higher level language, was never exposed to terms like malloc or buffer :( .
    I have a K&R with me, but felt descriptions are too short for these new ideas.
    I tried my hand with dummies, but that looks like kids play. Today i have collected a book called "C in a nutshell". But thought it will be wiser to ask wiser people.
    I am not looking for the *best* book in the market. Just a moderately helpful one. Or even, if the nutshell worth a try(its from O'Reilly's; by Prinz & Crawford)
    Rudra Banerjee, Jan 31, 2013
    #1
    1. Advertising

  2. Rudra Banerjee <> writes:
    > Hello friends,
    > I *really* dont want to flame a war here. But it will be helpful for
    > me if you can suggest a good book for me. I am not a novice
    > programmer, using fortan for ~10 years now. But from such higher level
    > language, was never exposed to terms like malloc or buffer :( . I
    > have a K&R with me, but felt descriptions are too short for these new
    > ideas. I tried my hand with dummies, but that looks like kids
    > play. Today i have collected a book called "C in a nutshell". But
    > thought it will be wiser to ask wiser people. I am not looking for
    > the *best* book in the market. Just a moderately helpful one. Or even,
    > if the nutshell worth a try(its from O'Reilly's; by Prinz & Crawford)


    Question 18.10 of the comp.lang.c FAQ, http://www.c-faq.com/, has some
    book recommendations, though some of them may be out of date.

    Avoid any books written by Schildt.

    Harbison & Steele's "C: A Reference Manual", now in its 5th edition, is
    a very good reference. It's not a tutorial.

    The FAQ recommends King's "C: A Modern Approach"; I haven't read it myself.

    The ISO C standard is the definitive reference to the language,
    but probably not good for learning (unless your mind is at least
    as twisted as mine). Publicly available drafts for the C99 and
    C11 standards, respectively, are:

    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
    http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Jan 31, 2013
    #2
    1. Advertising

  3. Rudra Banerjee <> wrote:

    > I *really* dont want to flame a war here. But it will be helpful
    > for me if you can suggest a good book for me.
    > I am not a novice programmer, using fortan for ~10
    > years now. But from such higher level language, was never
    > exposed to terms like malloc or buffer :( .


    In C the malloc() function does some of what the Fortran ALLOCATE
    statement does. More specifically, the form that allocates for
    pointer variables.

    Sometimes you can read data directly to where you want it to go,
    but sometimes you have to read it in somewhere else first.

    In Fortran, this is sometimes done reading into a CHARACTER
    variable, then using internal I/O to extract the data.
    The CHARACTER variable is then the buffer.

    Otherwise, 10 years of Fortran should make learning most of C
    pretty easy. It helps much if you have a little experience with
    the assembler language (not necessarily using an assembler)
    before learning C. To get used to thinking about data in
    terms of its address helps much.

    -- glen
    glen herrmannsfeldt, Jan 31, 2013
    #3
  4. Rudra Banerjee

    Jorgen Grahn Guest

    On Thu, 2013-01-31, Rudra Banerjee wrote:
    ....
    > I am not looking for the *best* book in the market. Just a
    > moderately helpful one. Or even, if the nutshell worth a try(its from
    > O'Reilly's; by Prinz & Crawford)


    You bought it; aren't you going to read it?

    I haven't read a book on C for 15 years, but AIUI the "Nutshell"
    series are high-quality books for smart people who aren't novices in
    the general area. Seems like a good description of a Fortran
    programmer.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Jan 31, 2013
    #4
  5. Keith Thompson <> writes:

    > Harbison & Steele's "C: A Reference Manual", now in its 5th edition, is
    > a very good reference.


    That's my favorite book about C. Clear writing. Tells it like it is.

    I believe Steele also wrote the Common Lisp manual and the Java manual.

    > ...It's not a tutorial.


    Well, yeah, but for someone with 10 years programming experience,
    I think it's a good tool for learning.

    - Bob
    Robert A Duff, Jan 31, 2013
    #5
  6. Rudra Banerjee

    Guest

    I'd have a look at Deitel's C - How to Program (2001) 3 Ed
    It is inexpensive and comprehensive.
    , Feb 1, 2013
    #6
  7. "Daniel W. Rouse Jr." <> writes:
    > "Rudra Banerjee" <> wrote in message
    > news:...
    >> Hello friends,
    >> I *really* dont want to flame a war here. But it will be helpful for
    >> me if you can suggest a good book for me.
    >> I am not a novice programmer, using fortan for ~10 years now. But
    >> from such higher level language, was never exposed to terms like
    >> malloc or buffer :( .
    >> I have a K&R with me, but felt descriptions are too short for these
    >> new ideas.
    >> I tried my hand with dummies, but that looks like kids play. Today i
    >> have collected a book called "C in a nutshell". But thought it will
    >> be wiser to ask wiser people.
    >> I am not looking for the *best* book in the market. Just a
    >> moderately helpful one. Or even, if the nutshell worth a try(its
    >> from O'Reilly's; by Prinz & Crawford)

    >
    > Anything by Herbert Schildt, I would say.
    >
    > Often times, Schildt's books are maligned because they occasionally
    > use Microsoft-specific extensions as opposed to strict ANSI C;
    > however, books by Schildt are the fastest way to get up to speed
    > without being riddled with distracting footnotes or more on this later
    > type of explanations. In Schildt's books, you'll be writing programs
    > quickly and the explanations are clear enough without being overly
    > verbose. They tend to be better than the Crash course, or Dummies, or
    > In 24 hours type of books in terms of completeness of coverage.


    Please, no, not Schildt!

    The general consensus seems to be that Schildt's books on C are written
    in a very engaging and easy to follow style, and describe a language
    that differs substantially from C. (I have no strong opinion on his
    writing style myself.) If you know the language well, you'll almost
    certainly find a serious error on any given page. That is *not* an
    exaggeration.

    See <http://www.lysator.liu.se/c/schildt.html> for a review by
    C.D.W. Feather of his book "The Annotated Annotated C Standard", and
    <http://www.seebs.net/c/c_tcn4e.html> for a review by Peter Seebach of
    "C: The Complete Reference".

    At the very least, read those reviews before you consider buying
    anything with Schildt's name on it.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Feb 1, 2013
    #7
  8. Rudra Banerjee

    James Kuyper Guest

    On 01/31/2013 07:11 PM, Daniel W. Rouse Jr. wrote:
    ....
    > Often times, Schildt's books are maligned because they occasionally use
    > Microsoft-specific extensions as opposed to strict ANSI C;


    No, they are maligned because they contain so many mistakes, some of
    them serious, and also by Schildt's refusal to acknowledge and correct
    those mistakes. That some of those mistakes take the form of being
    accurate statements about Microsoft's implementation of C, that Schildt
    incorrectly describes as if they were true of every implementation of C,
    is a relatively minor aspect of what's wrong with his book.
    --
    James Kuyper
    James Kuyper, Feb 1, 2013
    #8
  9. Rudra Banerjee

    JohnF Guest

    Rudra Banerjee <> wrote:
    > I am not a novice programmer, using fortan for ~10 years now.
    > I have a K&R with me, but felt descriptions are too short
    > for these new ideas.


    I also learned C after some 10+ years Fortran experience
    (and another ~5 with various assembler languages).
    For me, K&R was far-and-away the very best book
    to get up-and-running with C. I'd suggest you give it
    another try. And, of course, you have to actually write some
    programs. You can't learn any language just reading a book,
    no more than you could learn to play a piano just reading a book.
    In both cases you need to sit down at a keyboard.
    --
    John Forkosh ( mailto: where j=john and f=forkosh )
    JohnF, Feb 1, 2013
    #9
  10. While I agree that K&R is 'the' book to master, I wanted to point to
    this: http://www.mixsoftware.com/product/powerc.htm

    Over the years I saw many recomendations to this package, not because
    of the Power-C compiler itself, but because of the C tutorial book
    that comes with it. (I have not personally used it.)
    --
    Roberto Waltman

    [ Please reply to the group,
    return address is invalid ]
    Roberto Waltman, Feb 3, 2013
    #10
  11. Rudra Banerjee

    Hans Vlems Guest

    On 31 jan, 22:05, Rudra Banerjee <> wrote:
    > Hello friends,
    > I *really* dont want to flame a war here. But it will be helpful for me if you can suggest a good book for me.
    > I am not a novice programmer, using fortan for ~10 years now. But from such higher level language, was never exposed to terms like malloc or buffer :( .
    > I have a K&R with me, but felt descriptions are too short for these new ideas.
    > I tried my hand with dummies, but that looks like kids play. Today i have collected a book called "C in a nutshell". But thought it will be wiser to ask wiser people.
    > I am not looking for the *best* book in the market. Just a moderately helpful one. Or even, if the nutshell worth a try(its from O'Reilly's; by Prinz & Crawford)


    My recommendations would be K&R and King's "C: A Modern Approach".
    K&R tries to serve two purposes at the same time, to teach C and
    programming.
    It does so very well. King presents the language in detail and in
    clear English.
    I've used mainly (Burooughs) Algol, Pascal and a little Ada, Fortran
    IV and VAX assembly and King's book was a great help.
    Hans
    Hans Vlems, Feb 4, 2013
    #11
  12. Rudra Banerjee

    John Bode Guest

    On Thursday, January 31, 2013 3:40:15 PM UTC-6, Keith Thompson wrote:
    > Rudra Banerjee <> writes:
    >

    [snip]
    >
    > Harbison & Steele's "C: A Reference Manual", now in its 5th edition, is
    > a very good reference. It's not a tutorial.
    >


    H&S has been my primary reference since the 2nd edition (around 1987 or so).
    Like others have said, it's light on examples and tutorials, but as a
    *reference* manual it's one of the best, if not the best, on the market.
    John Bode, Feb 4, 2013
    #12
  13. Rudra Banerjee

    John Bode Guest

    On Thursday, January 31, 2013 6:11:17 PM UTC-6, Daniel W. Rouse Jr. wrote:
    > "Rudra Banerjee" <> wrote in message
    > news:...
    >

    [snip]
    >
    > Anything by Herbert Schildt, I would say.
    >


    No. Schildt is a *menace*, and has poisoned the minds of a generation
    of programmers.

    >
    > Often times, Schildt's books are maligned because they occasionally use
    > Microsoft-specific extensions as opposed to strict ANSI C;


    >_<


    They are maligned because they do not describe the language correctly.
    They are maligned because they teach *bad* habits.
    They are maligned because the example code is (or at least was)
    riddled with errors.

    And he didn't *occasionally* use MS-specific extensions in his examples.
    I bought the first edition while in college, and *none* of the examples
    would compile on VMS (almost every example used conio). And, of
    course, since I was still in the process of learning the language along
    with learning how to program in general, I didn't know what was C and what
    was MS-specific, and Schildt didn't bother to point it out.

    There were also some non-trivial logic errors in his examples, such
    as attempting to write to a file after closing it, or accessing data
    through an invalid pointer, etc.

    I picked up the fourth edition of "C: The Complete Reference", and while
    the most obvious howlers had been dealt with, there were still some
    mistakes that shouldn't have survived to the second edition, much less the
    fourth.
    John Bode, Feb 4, 2013
    #13
  14. Rudra Banerjee

    Hans Vlems Guest

    On 4 feb, 21:12, John Bode <> wrote:
    > On Thursday, January 31, 2013 6:11:17 PM UTC-6, Daniel W. Rouse Jr. wrote:
    >
    > > "Rudra Banerjee" <> wrote in message
    > >news:...

    >
    > [snip]
    >
    > > Anything by Herbert Schildt, I would say.

    >
    > No.  Schildt is a *menace*, and has poisoned the minds of a generation
    > of programmers.
    >
    >
    >
    > > Often times, Schildt's books are maligned because they occasionally use
    > > Microsoft-specific extensions as opposed to strict ANSI C;
    > >_<

    >
    > They are maligned because they do not describe the language correctly.
    > They are maligned because they teach *bad* habits.
    > They are maligned because the example code is (or at least was)
    > riddled with errors.
    >
    > And he didn't *occasionally* use MS-specific extensions in his examples.
    > I bought the first edition while in college, and *none* of the examples
    > would compile on VMS (almost every example used conio).  And, of
    > course, since I was still in the process of learning the language along
    > with learning how to program in general, I didn't know what was C and what
    > was MS-specific, and Schildt didn't bother to point it out.
    >
    > There were also some non-trivial logic errors in his examples, such
    > as attempting to write to a file after closing it, or accessing data
    > through an invalid pointer, etc.
    >
    > I picked up the fourth edition of "C: The Complete Reference", and while
    > the most obvious howlers had been dealt with, there were still some
    > mistakes that shouldn't have survived to the second edition, much less the
    > fourth.


    For (VAX/)VMS specific examples I still use "Programming in VAX-11 C".
    It was printed in May 1982 and is not exactly cutting edge technology,
    even for VMS.
    Still useful as an introduction to RMS programming though.
    Hans
    Hans Vlems, Feb 4, 2013
    #14
  15. Hans Vlems <> writes:
    [...]
    > For (VAX/)VMS specific examples I still use "Programming in VAX-11 C".
    > It was printed in May 1982 and is not exactly cutting edge technology,
    > even for VMS.
    > Still useful as an introduction to RMS programming though.


    RMS being VMS's Record Management Services, for those who are unfamiliar.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Working, but not speaking, for JetHead Development, Inc.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Feb 5, 2013
    #15
  16. Rudra Banerjee

    Guest

    On Thursday, January 31, 2013 3:05:15 PM UTC-6, Rudra Banerjee wrote:
    > Hello friends,
    >
    > I *really* dont want to flame a war here. But it will be helpful for me if you can suggest a good book for me.

    read the C FAQ when an issue is unclear.
    Plus there are C tutorials where you can go at your own pace.

    Avoid Schildt. I had him as a C++ instructor and we were using his C++ and it was riddled with errors. His excuse was it keeps you on your toes. He also blamed his editor. He came to class on his motorcycle and wore his leather jacket. He even handed out correction sheets to pages in the books for serious errors.

    Not as bad as the professor that said "You should never need more than twenty six variables so just use the letter as a variable name.
    Not as bad as the purple project (all branches of the government and I had the program running. Then I get this roll of paper that is thirty feet long and five feet deep from the sponsor. To keep all of the variables happy in their land was to name them with seventy eight long character names. Thank God for search and replace.

    This was the same project that my manager deleted all the graphing setup since he said "This is OO it has default values. What a Hoser.

    > I am not a novice programmer, using fortan for ~10 years now. But from such higher level language, was never exposed to terms like malloc or buffer :( .
    >
    > I have a K&R with me, but felt descriptions are too short for these new ideas.
    >
    > I tried my hand with dummies, but that looks like kids play. Today i havecollected a book called "C in a nutshell". But thought it will be wiser toask wiser people.
    >
    > I am not looking for the *best* book in the market. Just a moderately helpful one. Or even, if the nutshell worth a try(its from O'Reilly's; by Prinz & Crawford)
    , May 4, 2014
    #16
  17. Rudra Banerjee

    buja Guest

    Op zondag 4 mei 2014 01:39:52 UTC+2 schreef :
    > On Thursday, January 31, 2013 3:05:15 PM UTC-6, Rudra Banerjee wrote:
    >
    > > Hello friends,

    >
    > >

    >
    > > I *really* dont want to flame a war here. But it will be helpful for meif you can suggest a good book for me.

    >
    > read the C FAQ when an issue is unclear.
    >
    > Plus there are C tutorials where you can go at your own pace.
    >
    >
    >
    > Avoid Schildt. I had him as a C++ instructor and we were using his C++ and it was riddled with errors. His excuse was it keeps you on your toes. He also blamed his editor. He came to class on his motorcycle and wore his leather jacket. He even handed out correction sheets to pages in the books forserious errors.
    >
    >
    >
    > Not as bad as the professor that said "You should never need more than twenty six variables so just use the letter as a variable name.
    >
    > Not as bad as the purple project (all branches of the government and I had the program running. Then I get this roll of paper that is thirty feet long and five feet deep from the sponsor. To keep all of the variables happyin their land was to name them with seventy eight long character names. Thank God for search and replace.
    >
    >
    >
    > This was the same project that my manager deleted all the graphing setup since he said "This is OO it has default values. What a Hoser.
    >
    >
    >
    > > I am not a novice programmer, using fortan for ~10 years now. But from such higher level language, was never exposed to terms like malloc or buffer :( .

    >
    > >

    >
    > > I have a K&R with me, but felt descriptions are too short for these newideas.

    >
    > >

    >
    > > I tried my hand with dummies, but that looks like kids play. Today i have collected a book called "C in a nutshell". But thought it will be wiser to ask wiser people.

    >
    > >

    >
    > > I am not looking for the *best* book in the market. Just a moderately helpful one. Or even, if the nutshell worth a try(its from O'Reilly's; by Prinz & Crawford)


    I would like to mention 3 books:
    A. C Programming: A Modern Approach, K.N. King (already mentioned above)
    B. Programming in C, Stephen G. Kochan
    C. Pointers in C, Y. Kanetkar

    A and B are good and very similar books about programming in C. King decomposes stuff a bit more, making it a bit easier. While most books refer to C89, these books take it up to C99.
    Book C is a strange one. It goes back on Turbo C on DOS, although its firstedition is from 2001. I sometimes have my doubts about the writing style (but I am not a native English speaker) and what it says (some weird constructs I would not use myself), but the book excels with its example programs:91 complete programs that work (as opposed to the usual bits and pieces inmost other books).
    It might be something for Bill Cunningham ;)
    buja, May 4, 2014
    #17
  18. Rudra Banerjee

    buja Guest

    > He came to class on his motorcycle and wore his leather jacket.

    What is the problem with that? I would consider that a plus!
    buja, May 4, 2014
    #18
  19. Rudra Banerjee

    G G Guest

    how about " C How To Program",Deitel and Deitel

    and with that book, use this group, because they do a great job of explaining what may be out of date or out of spec.

    it seems to be an easy read.

    "Head First C" is another easy read.

    with those easy reads and group you'll move really quickly. but, great books, i would say they are not.

    C Programming A Modern Approach.
    G G, May 5, 2014
    #19
  20. "buja" <> wrote in message
    news:...

    It might be something for Bill Cunningham ;)

    No. Nah. I'm told these books are all wrong. Throw them away.
    Bill Cunningham, May 6, 2014
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tsj
    Replies:
    4
    Views:
    770
  2. Thanasis \(sch\)

    awt book+java animation book

    Thanasis \(sch\), Oct 13, 2004, in forum: Java
    Replies:
    1
    Views:
    595
    Alex Hunsley
    Oct 14, 2004
  3. coltrane
    Replies:
    2
    Views:
    477
    coltrane
    Sep 27, 2006
  4. Gio

    Puzzle Book & Answer Book

    Gio, Apr 17, 2008, in forum: C Programming
    Replies:
    1
    Views:
    395
    santosh
    Apr 17, 2008
  5. vasudevram
    Replies:
    0
    Views:
    215
    vasudevram
    Apr 15, 2007
Loading...

Share This Page