[comp.lang.c] C language book recommendations

reivich1@mscf.med.upenn.edu (05/06/91)

I am looking for recommendations for a C Programming book. I already have
"The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now
looking for something a little more descriptive, something that is easier to
use for quick reference, with more examples. Any suggestions?

Samir

gmurray@ibmpcug.co.uk (G Murray) (05/07/91)

In article <1991May6.101403.1@mscf.med.upenn.edu> reivich1@mscf.med.upenn.edu writes:
> I am looking for recommendations for a C Programming book. I already have
> "The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now
> looking for something a little more descriptive, something that is easier to
> use for quick reference, with more examples. Any suggestions?

  C: A Reference Manual 3rd Edition
  Samuel P Harbison & Guy L Steele Jr
  Prentice Hall

 I haven't got the ISBN number for the 3rd edition.

 This book covers C is quite some detail and I can highly reccomend it.


----------------------------------------------------------------------
Graham Murray			  Email gmurray@ibmpcug.co.uk
Senior Programmer		    OR  gmurray@cix.compulink.co.uk
Gravatom Technology Ltd		  Voice +44 329 823986
----------------------------------------------------------------------

q-- 
Automatic Disclaimer:
The views expressed above are those of the author alone and may not
represent the views of the IBM PC User Group.
-- 

smbrush@lims01.lerc.nasa.gov (ANDREW BRUSH) (05/07/91)

In article <1991May6.101403.1@mscf.med.upenn.edu>, reivich1@mscf.med.upenn.edu writes...
>I am looking for recommendations for a C Programming book. I already have
>"The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now
>looking for something a little more descriptive, something that is easier to
>use for quick reference, with more examples. Any suggestions?
> 
>Samir

"A Book on C", Al Kelley & Ira Pohl, Benjamin/Cummings, 1990

Andrew S. Brush             | SMBRUSH@EARTH.lerc.nasa.gov
Sverdrup Technology         | 2001 Aerospace Parkway
NASA LeRC Group             | Brook Park, OH 44142
"Opinions are Mine, Only"   | (216) 826-6770

gordon@osiris.cso.uiuc.edu (John Gordon) (05/08/91)

	Try _The Waite Group's C Primer_.

John

rayc@ritcsh.csh.rit.edu (Ray Cardillo ("Truck")) (05/08/91)

In article <1991May7.204636.3272@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes:
>
>	Try _The Waite Group's C Primer_.
>
>John

 A very good book indeed, however the best recommendation would have to be the
book called 'C' by Dennis Ritchie and ?. Kernigand.  A very good book (
Ritchie wrote most of the language he should have a good book!



-- 
     ]   Did I contradict myself?    [[|]]  "Sanity is in the mind of    [
     ]   Very well then,             [[|]]   the beholder."              [
     ]   I contradict myself         [[|]]                               [
     ]       - Walt Whitman          [[|]]    - Ray Cardillo (Truck)     [

DOCTORJ@SLACVM.SLAC.STANFORD.EDU (Jon J Thaler) (05/09/91)

In article <1991May7.204636.3272@ux1.cso.uiuc.edu>, gordon@osiris.cso.uiuc.edu
(John Gordon) says:
>
>        Try _The Waite Group's C Primer_.

I don't know how uniform in quality the Wait Group's books are, but I have read
their "C++  Programming" by John Berry.  It is a very mediocre book.  It
reads like it was written by recipe.

huj@kuhub.cc.ukans.edu (05/10/91)

In article <1991May9.204547.16573@nntp-server.caltech.edu>,
magyar@betwixt.caltech.edu (Igen Magyar Istvani) writes: 
> 
> Well, K&R is OK - we use it here at 'tech for our intro to programming 
> course.  However, I find that it is not very useful either as a reference
> or for learning the language.  The book only hits the _very_ high points of
> C, dealing mostly with structured programming instead.  It virtually ignores
> most of the .h files, and gives almost no information on the use of the
> myriad functions provided in them.  After a year of dealing with K&R, I've
> finally decided to go to my favorite bookstore on Colorado Blvd. and find
> a _good_ book for C.  
> 
> Ted Turocy
> magyar@through.cs.caltech.edu

On the contrary, this is what I found to be one of the more useful
features of K&R, the appendixes:  Appendix A is the Reference Manual,
which describes in detail the syntax of all the structures and
statements.  Appendix B is the Standard Librabry, which describes the
functions in the standard headers, what they do and how to call them.
I am talking about the 2nd edition of _The_C_Programming_Language_ by
Kernighan and Ritchie.
-- 
James C. Hu              |     (___)      /^^^^^\
HUJ @ KUHUB.CC.UKANS.EDU |     /- -\     /  MU  /
-------------------------+    (  ^  ) __/______/
            Buddha's Cow       \_O_/

magyar@betwixt.caltech.edu (Igen Magyar Istvani) (05/10/91)

In article <1991May8.023819.15085@ritcsh.csh.rit.edu> rayc@ritcsh.csh.rit.edu (Ray Cardillo  ("Truck")) writes:
>
> A very good book indeed, however the best recommendation would have to be the
>book called 'C' by Dennis Ritchie and ?. Kernigand.  A very good book (
>Ritchie wrote most of the language he should have a good book!
>

Well, K&R is OK - we use it here at 'tech for our intro to programming 
course.  However, I find that it is not very useful either as a reference
or for learning the language.  The book only hits the _very_ high points of
C, dealing mostly with structured programming instead.  It virtually ignores
most of the .h files, and gives almost no information on the use of the
myriad functions provided in them.  After a year of dealing with K&R, I've
finally decided to go to my favorite bookstore on Colorado Blvd. and find
a _good_ book for C.  

Ted Turocy
magyar@through.cs.caltech.edu
----------
"It _should_ have been called the Hungaro-Austrian Empire."

bobf@intermec.com (Bob Folline) (05/10/91)

In article <1991May6.101403.1@mscf.med.upenn.edu> reivich1@mscf.med.upenn.edu writes:
>I am looking for recommendations for a C Programming book. I already have
>"The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now
>looking for something a little more descriptive, something that is easier to
>use for quick reference, with more examples. Any suggestions?
>

I would strongly recomend "ANSI C A LEXIXAL GUIDE" if your primary desire
is looking up functions.  This is the most informative book I have used
with information on where the function is found <float.h>,  where it is used
DOS, UNIX,etc,  And a consise example of usage.

>Samir

Bob Folline
bobf@intermec.com

adler@acf3.NYU.EDU (Andre Adler) (05/12/91)

/* acf3:comp.lang.c / reivich1@mscf.med.upenn.edu /  6:14 am  May  6, 1991 */
I am looking for recommendations for a C Programming book. I already have
"The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now
looking for something a little more descriptive, something that is easier to
use for quick reference, with more examples. Any suggestions?

Samir
/* ---------- */

I think a really nice book is "A Book on C" by Kelley and Pohl.
It's easier to follow than K&R and has nice examples which are dissected
and explained in nice detail. It's especially nice if you program in a
UNIX environment. Look at this book, especially the last 2 chapters and
you will see what I mean. 

    Enjoy,


             Andre

huang@husc10.harvard.edu (Howard Huang) (05/13/91)

   Well, K&R is OK ... It virtually ignores
   most of the .h files, and gives almost no information on the use of the
   myriad functions provided in them.  

Harbison & Steele's "C Reference Manual" has a good discussion of the
standard (ANSI C) libraries.
--

----------------------------------------------------------------------------
Howard C. Huang                        Internet:  huang@husc9.harvard.edu
Junior Computer Science Major          Bitnet:    huang@husc9.BITNET
Mather House 030, Harvard College      UUCP:      ...!harvard!husc9!huang
Cambridge, MA 02138                    

daves@hpopd.pwd.hp.com (Dave Straker) (05/13/91)

>  C: A Reference Manual 3rd Edition
>  Samuel P Harbison & Guy L Steele Jr
>  Prentice Hall

Seconded. This does seem to be a definitive work which is widely referenced.

Dave Straker            Pinewood Information Systems Division (PWD not PISD)
[8-{)                   HPDESK: David Straker/HP1600/01
                        Unix:   daves@hpopd.pwd.hp.com

gtephx (Wild Rider) (05/15/91)

	In article <1991May7.131019.17480@eagle.lerc.nasa.gov>
	smbrush@lims01.lerc.nasa.gov writes:
>In article <1991May6.101403.1@mscf.med.upenn.edu>, reivich1@mscf.med.upenn.edu writes...
>>I am looking for recommendations for a C Programming book. I already have
>>"The C Programming Language" by Kernighan and Ritchie (2nd edition). I am now

	[ ... etc. ... ]

>> 
>>Samir
>
>"A Book on C", Al Kelley & Ira Pohl, Benjamin/Cummings, 1990
 ^^^^^^^^^^^^
	allow me to offer a differing opinion on this book.

	i taught a 200 level course on c programming in which this
	book had been selected as the course text before i joined
	the dept.  since i had no experience with the book, i gave
	it a try... "hated it."

	my students were continually confused by it, since in many
	cases it tried to oversimplify or gloss over subtleties in
	the language.  as peter norton has stated, "c is the
	industrial strength programming language."  thus, it does
	_not_ lend itself well to oversimplification.
	
	since i had originally learned c from the c bible (k&r 1), 
	i (fortunately) added this as the supplementary text for
	the course.  although it is terse, so is c, giving the
	reader an instant flavor for the language itself.  also,
	since c is _not_ a beginners language (refer to peter
	norton, above), k&r is perfectly suited for someone
	already familiar with programming concepts and ready to
	delve into the advanced concepts (& dangers) of c.

	for an alternate to the c bible, i would recommend
	andrew koenig's text entitled (sorry, need to refresh my
	brain's ram, can't recall the exact title): "c programming:
	traps & pitfalls"

>
>Andrew S. Brush             | SMBRUSH@EARTH.lerc.nasa.gov
>Sverdrup Technology         | 2001 Aerospace Parkway
>NASA LeRC Group             | Brook Park, OH 44142
>"Opinions are Mine, Only"   | (216) 826-6770


-- 
Wallace Roberts, AG (formerly GTE) Communication Systems, Phoenix, AZ
UUCP: ...!{ncar!noao!asuvax | uunet!zardoz!hrc | att}!gtephx!robertsw
Internet: gtephx!robertsw@asuvax.eas.asu.edu    Bike: '82 GS1100L Suz
voice: (602)581-4555    fax: (602)582-7624      Cage: '89 Mustang  GT

rpjday@ccu.umanitoba.ca (05/21/91)

In article <36770001@hpopd.pwd.hp.com> daves@hpopd.pwd.hp.com (Dave Straker) writes:
>>  C: A Reference Manual 3rd Edition
>>  Samuel P Harbison & Guy L Steele Jr
>>  Prentice Hall
>
>Seconded. This does seem to be a definitive work which is widely referenced.
>
Yup.  Even the occasional annoying typo doesn't detract much.
What typo?  Glad you asked.

Page 93, discussing the omitted storage class model which describes
how external names are linked:

"In this scheme, the storage class extern must be explicitly
included on all referencing declarations, and the storage class
must be omitted from the single defining declaration for each
external variable.  The defining declaration can include an
initializer, but it is not required to do so.  (It is illegal
to have both an initializer and the storage class extern in a 
declaration.)  This solution is probably the most common one,
and the one adopted in ANSI C."

  On the very next page, in a table showing the legalities of
various declarations in various models, we read that

extern int x = 0 ;

 in the omitted storage class model is treated as a reference.
However, according to the explanation on p. 93, this should
be illegal.  Comments?

R. Day

steve@taumet.com (Stephen Clamage) (05/22/91)

rpjday@ccu.umanitoba.ca writes:

>>>  C: A Reference Manual 3rd Edition
>>>  Samuel P Harbison & Guy L Steele Jr
>>>  Prentice Hall

>Even the occasional annoying typo doesn't detract much.
>What typo?  Glad you asked.

>On [page 94], in a table showing the legalities of
>various declarations in various models, we read that

>extern int x = 0 ;

>in the omitted storage class model is treated as a reference.
>However, according to the explanation on p. 93, this should
>be illegal.  Comments?

Look over the material again.  In their book, H&S are not presenting only
ANSI C.  They are trying to cover the range of C implementations which have
been at all widely used.  If you have to write code for a variety of C
implementations, or understand some moldy old code written for some
system you do not have access to, this book will help.  It explains all
the common things which have been done, and how you can get your code
to work.

As to your specific example, it is clearly marked in the table as
"illegal" for typical C implementations, and "Don't use" under
the "recommendation" column.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com

rpjday@ccu.umanitoba.ca (05/25/91)

In article <741@taumet.com> steve@taumet.com (Stephen Clamage) writes:
>rpjday@ccu.umanitoba.ca writes:
>
>>>>  C: A Reference Manual 3rd Edition
>>>>  Samuel P Harbison & Guy L Steele Jr
>>>>  Prentice Hall
>
>>Even the occasional annoying typo doesn't detract much.
>>What typo?  Glad you asked.
>
>>On [page 94], in a table showing the legalities of
>>various declarations in various models, we read that
>
>>extern int x = 0 ;
>
>>in the omitted storage class model is treated as a reference.
>>However, according to the explanation on p. 93, this should
>>be illegal.  Comments?
>
>Look over the material again.  In their book, H&S are not presenting only
>ANSI C.  They are trying to cover the range of C implementations which have
>been at all widely used.  If you have to write code for a variety of C
>implementations, or understand some moldy old code written for some
>system you do not have access to, this book will help.  It explains all
>the common things which have been done, and how you can get your code
>to work.
>
>As to your specific example, it is clearly marked in the table as
>"illegal" for typical C implementations, and "Don't use" under
>the "recommendation" column.
>-- 
>
>Steve Clamage, TauMetric Corp, steve@taumet.com

  I don't have my 3rd ed. of H&S here, so I may very well 
embarrass myself, but I think I checked out that section
thoroughly enough to remember what it says.  I am aware that
H&S are showing various compiler models.  They also quite
CLEARLY say that one of them, the omitted storage class
model, is what ANSI C uses.  Their definition of this model
is what I have given above.  On the next page, they also 
CLEARLY say that "extern int x = 0;" is not, as you claim,
illegal, but that it is to be treated as a reference --
that is, a referencing declaration.

  What H&S recommend is irrelevant.  My concern is with the
entry in the table.  Comments?

R. Day

vinoski@apollo.HP.COM (Stephen Vinoski) (05/30/91)

In article <1991May24.192404.29227@ccu.umanitoba.ca> rpjday@ccu.umanitoba.ca writes:
>In article <741@taumet.com> steve@taumet.com (Stephen Clamage) writes:
>>Look over the material again.  In their book, H&S are not presenting only
>>ANSI C.  They are trying to cover the range of C implementations which have
>>been at all widely used.  If you have to write code for a variety of C
>>implementations, or understand some moldy old code written for some
>>system you do not have access to, this book will help.  It explains all
>>the common things which have been done, and how you can get your code
>>to work.
>
>  I don't have my 3rd ed. of H&S here, so I may very well 
>embarrass myself, but I think I checked out that section
>thoroughly enough to remember what it says.  I am aware that
>H&S are showing various compiler models.  They also quite
>CLEARLY say that one of them, the omitted storage class
>model, is what ANSI C uses.  Their definition of this model
>is what I have given above.  On the next page, they also 
>CLEARLY say that "extern int x = 0;" is not, as you claim,
>illegal, but that it is to be treated as a reference --
>that is, a referencing declaration.

The book definitely contradicts itself here.  I have reported the
problem to Sam Harbison.


-steve

| Steve Vinoski  (508)256-0176 x5904       | Internet: vinoski@apollo.hp.com  |
| HP Apollo Division, Chelmsford, MA 01824 | UUCP: ...!apollo!vinoski         |

chaplin@keinstr.uucp (chaplin) (06/05/91)

In article <741@taumet.com> steve@taumet.com (Stephen Clamage) writes:
>Look over the material again.  In their book, H&S are not presenting only
>ANSI C.  They are trying to cover the range of C implementations which have
>been at all widely used.  If you have to write code for a variety of C
>implementations, or understand some moldy old code written for some
>system you do not have access to, this book will help.  It explains all
>the common things which have been done, and how you can get your code
>to work.

>Steve Clamage, TauMetric Corp, steve@taumet.com

I have the 2nd Edition, which has a separate chapter dealing with "draft
proposed ANSI C".  I personally prefer this approach, exactly for the
reason you mention: not all the compilers I use are ANSI.  Perhaps the
other changes in the 3rd Edition (I assume there are some) would make
it worthwhile to have.
-- 
Roger Chaplin / Instruments Division Engineering | "There are two types of
chaplin@keinstr.uucp / CI$: 76307,3506           | people: those who divide
#include <disclaimer.h>                          | people into two types, and
#include "disclaimer.h"  /* cover all bases */   | those who don't." - Barth

jbr0@cbnews.cb.att.com (joseph.a.brownlee) (06/11/91)

In article <1991Jun4.212317.1213@keinstr.uucp> chaplin@keinstr.uucp (Roger
Chaplin) writes:
> In article <741@taumet.com> steve@taumet.com (Stephen Clamage) writes:
> > Look over the material again.  In their book, H&S are not presenting only
> > ANSI C.  They are trying to cover the range of C implementations which have
> > been at all widely used.  [...]
>
>I have the 2nd Edition, which has a separate chapter dealing with "draft
>proposed ANSI C".  I personally prefer this approach, exactly for the
>reason you mention: not all the compilers I use are ANSI.  Perhaps the
>other changes in the 3rd Edition (I assume there are some) would make
>it worthwhile to have.

It is most definitely worth having.  Rather than a chapter on ANSI C, each
aspect of the language contains a discussion on both ANSI and pre-ANSI
implementations, and it points out where the ANSI standard differs from
some earlier commonly used implementations.  This is imporatant to me,
precisely because I must use both pre-ANSI and ANSI compilers.

H&S is the most practical of the C books I have.  I recommend it
whole-heartedly.

-- 
   -      _   Joe Brownlee, Analysts International Corporation @ AT&T Bell Labs
  /_\  @ / `  471 E Broad St, Suite 1610, Columbus, Ohio 43215   (614) 860-7461
 /   \ | \_,  E-mail: jbr@cblph.att.com     Who pays attention to what _I_ say?
 "Scotty, we need warp drive in 3 minutes or we're all dead!" --- James T. Kirk