By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

beginner c question

P: n/a
yes,

i'm reading the book "practical c programming" and going along on my
own trying to learn c. i know the basics of programming, but there seem
to be some idiosyncracies in c that i don't understand and aren't
explained in the book. contained within the book are exercises i'm
trying to work through but when they fail i'm not sure where to turn to
and before i go all willy-nilly and post even very short code in here
hoping someone will help me understand what's going wrong, i figured i
should ask first to see if it is appropriate or if there is some other
recourse available to me.

thank you very much for your help.

Jun 23 '06 #1
Share this Question
Share on Google+
29 Replies


P: n/a

pencilneck wrote:
yes,

i'm reading the book "practical c programming" and going along on my
own trying to learn c. i know the basics of programming, but there seem
to be some idiosyncracies in c that i don't understand and aren't
explained in the book. contained within the book are exercises i'm
trying to work through but when they fail i'm not sure where to turn to
and before i go all willy-nilly and post even very short code in here
hoping someone will help me understand what's going wrong, i figured i
should ask first to see if it is appropriate or if there is some other
recourse available to me.


By the sound of it, this is the right place for your questions.
Before posting, it's good to go through the following links:

http://www.clc-wiki.net/wiki/Introdu...to_comp.lang.c
http://c-faq.com/

The second one should really be your first stop for any question.

Also, I'd suggest you capitalise properly, and use more punctuation. I
found the paragraph above very hard to follow (I actually had to read
it twice to make sure I understand your question correctly).

PS
Donnig on some asbestos underware is also a good idea in these parts.

Jun 23 '06 #2

P: n/a
pencilneck said:
yes,

i'm reading the book "practical c programming"
That's your first mistake.
and going along on my own trying to learn c.
And that's your second.
i know the basics of programming,
Then you want: "The C Programming Language", 2nd edition, 1988, by Brian W
Kernighan and Dennis M Ritchie. The latter of these gentlemen designed the
language itself, and both are astoundingly clear writers.
and before i go all willy-nilly and post even very short code in here
hoping someone will help me understand what's going wrong, i figured i
should ask first to see if it is appropriate or if there is some other
recourse available to me.


Yeah, you can do that. Please do try to help us to help you, though. You can
do this as follows:

1) please read the FAQs, in case your question is answered there. Many
questions are.

2) please stick to C questions here in comp.lang.c - the language and
standard library are both topical here, but in /this/ newsgroup we don't do
sockets, SQL interfaces, serial ports, and so on. There are other
newsgroups for such things.

2) please provide as much information as necessary, but as little as
possible, by reducing your program to the smallest that reproduces the
problem, but which is a complete program. For example, try not to post a
1000-line program here if you can reduce the program to a twenty-liner that
still has the same problem.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #3

P: n/a
Thank you both for your prompt replies.

I will do as you both suggest. After going over the FAQs I will submit
another post to this newsgroup.

Jun 23 '06 #4

P: n/a
Richard Heathfield <in*****@invalid.invalid> writes:
pencilneck said:
yes,

i'm reading the book "practical c programming"


That's your first mistake.


This made me curious. This is the O'Reilly book, isn't it?
I do no see it on your website list of recommended books, either.
Do you not consider it a good book? And if so, why?

Asbjørn

--
Asbjørn Sæbø

Q2S - Centre for Quantifiable Quality of Service in Communication Systems
http://www.q2s.ntnu.no/~asbjs/
Jun 23 '06 #5

P: n/a
Asbjørn Sæbø said:
Richard Heathfield <in*****@invalid.invalid> writes:
pencilneck said:
> yes,
>
> i'm reading the book "practical c programming"
That's your first mistake.


This made me curious. This is the O'Reilly book, isn't it?


Yes.
I do no see it on your website list of recommended books, either.
Right.
Do you not consider it a good book?
No.
And if so, why?


I can't remember. :-) I don't actually have a copy myself, but I used to
include it on my list of recommended books a few years ago, purely on the
basis that others were recommending it here in clc and nobody seemed to
object (so that was silly of me, wasn't it?); then, one day, I saw a copy
kicking around at work, and spent a lunchbreak flicking through it.

Oh deary deary me.

I can't be specific, I'm afraid, about the errors I found, because I didn't
bother to record them at the time. And I do understand that all books will
contain /some/ errors. But this book had the wrong *kinds* of errors - they
weren't just typos, or even thinkos. They were basic and fundamental
misunderstandings about the nature of C.

As soon as I got home, I immediately took the book off my list.

Perhaps someone who actually has a copy will be kind enough to refresh my
memory about *precisely* what's wrong with it.

Or, if I ever see a copy in a bookshop again, I'll flick through it and take
some notes. I don't recall seeing it for years, though.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #6

P: n/a
Richard Heathfield <in*****@invalid.invalid> writes:
[About the book "practical c programming" and why it is not
recommended]


Thanks. I have been wondering whether to order this book, but now I
think I will abstain.

With kind regards
Asbjørn
--
Asbjørn Sæbø

Q2S - Centre for Quantifiable Quality of Service in Communication Systems
http://www.q2s.ntnu.no/~asbjs/
Jun 23 '06 #7

P: n/a
Richard Heathfield wrote:
and going along on my own trying to learn c.


And that's your second.


Now I'm curious! Whats wrong with trying to learn
something on your own[1]? I'm currently learning
another programming language, and I've not paid a
tutor, nor enrolled in any course.

Lurking (and sometimes asking) on the newsgroup
for the language exposes me to a wide variety
of acerbic wit and usenet comedians in addition
to a handfull of genuinely helpful individuals.

Learning for the sake of learning[2], no matter how
baroque the knowledge gained, can't be all that bad.

The type of person who is determined to gain
knowledge even in the absence of a teacher or
any reward for the new knowledge will get it one
way or another, anyway.

"I won't teach you anything, but I might let you
learn"
(roughly paraphrased )
Maskerade,
Terry Pratchet.
[1] I know I know ... "fool for a teacher" and all of
that; doesn't mean that it isn't possible.

[2] Which is what I'm currently doing.
goose,

Jun 23 '06 #8

P: n/a
pencilneck wrote:

Thank you both for your prompt replies.

I will do as you both suggest. After going over the FAQs I will
submit another post to this newsgroup.


Also make sure you include adequaate context when replying to other
articles. If you are using a google access point that has not yet
corrected the reply mechanism, see my sig. below for the
appropriate means. Be sure to read the referenced URLs.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Jun 23 '06 #9

P: n/a
On 2006-06-23, goose <ru**@webmail.co.za> wrote:
Richard Heathfield wrote:
> and going along on my own trying to learn c.


And that's your second.


Now I'm curious! Whats wrong with trying to learn
something on your own[1]? I'm currently learning
another programming language, and I've not paid a
tutor, nor enrolled in any course.

Lurking (and sometimes asking) on the newsgroup
for the language exposes me to a wide variety
of acerbic wit and usenet comedians in addition
to a handfull of genuinely helpful individuals.

[1] I know I know ... "fool for a teacher" and all of
that; doesn't mean that it isn't possible.


If you're lurking or asking on usenet, you aren't
learning alone.

--
Andrew Poelstra < http://www.wpsoftware.net/blog >
To email me, use "apoelstra" at the above address.
I know that area of town like the back of my head.
Jun 23 '06 #10

P: n/a
goose said:
Richard Heathfield wrote:
> and going along on my own trying to learn c.
And that's your second.


Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it /right/. I
wish I'd had comp.lang.c at my disposal whilst I was learning C the first
time. Then I wouldn't have had to learn it all over again.
I'm currently learning
another programming language, and I've not paid a
tutor, nor enrolled in any course.
But here you are in comp.lang.c - so you're not alone any more. :-)
Lurking (and sometimes asking) on the newsgroup
for the language exposes me to a wide variety
of acerbic wit and usenet comedians in addition
to a handfull of genuinely helpful individuals.
You see? All those extra benefits, at no extra cost!
Learning for the sake of learning[2], no matter how
baroque the knowledge gained, can't be all that bad.


No, it's a great idea - but how do you know you're learning the right stuff?
With feedback from people whose knowledge you trust to be right, that's
how. Or if you don't trust their knowledge, at least you can trust the end
product of their Standard-based debating. We might not get it perfectly
right all the time, but the few cases where we as a group get it wrong it
are probably /so/ few and /so/ obscure that it actually doesn't matter.
Compare this to a book, where mostly you're trusting to the bookshop's
opinion of the author ("does this guy sell well enough to justify shelf
space?" rather than "does this guy know C?").

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #11

P: n/a
"Richard Heathfield" writes:
Richard Heathfield wrote:
> and going along on my own trying to learn c.

And that's your second.


Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it /right/. I
wish I'd had comp.lang.c at my disposal whilst I was learning C the first
time. Then I wouldn't have had to learn it all over again.


Perhaps the OP is in the US. Where to "learn on your own" simply means no
course and no tutor.
Jun 23 '06 #12

P: n/a
osmium said:
Perhaps the OP is in the US.


Well, I have every sympathy for him, but I don't see what you expect me to
do about it.

--
Richard Heathfield
"Usenet is a strange place" :-) dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #13

P: n/a
Richard Heathfield <in*****@invalid.invalid> writes:
goose said:
Richard Heathfield wrote:
> and going along on my own trying to learn c.

And that's your second.


Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it /right/. I
wish I'd had comp.lang.c at my disposal whilst I was learning C the first
time. Then I wouldn't have had to learn it all over again.
I'm currently learning
another programming language, and I've not paid a
tutor, nor enrolled in any course.


But here you are in comp.lang.c - so you're not alone any more. :-)


Even tutors can be a problem. After my C classes in college I thought
I knew C. What a surprise to realize that I learnt Turbo C under DOS
running on a 80286 and half of it was useless when I switched to gcc
running on a Sparc with Solaris. Even more, I had no idea there was
such a thing as a standard C (not too much internet available at that
time, and no real knowledge on how to use it. The books at the library
were mostly about Turbo C). I wish I have known there was such a thing
as c.l.c.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jun 23 '06 #14

P: n/a
"osmium" <r1********@comcast.net> writes:
"Richard Heathfield" writes:
Richard Heathfield wrote:
> and going along on my own trying to learn c.

And that's your second.
Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it /right/. I
wish I'd had comp.lang.c at my disposal whilst I was learning C the first
time. Then I wouldn't have had to learn it all over again.


Perhaps the OP is in the US. Where to "learn on your own" simply means no
course and no tutor.


I wouldn't say that. This is not a US thing. Trust me.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jun 23 '06 #15

P: n/a
I do not agree at all

You can learn C with a book and a C compiler.
Many people have done this, and K & R book is quite readable.

I learned it that way, using K & R (french edition, I still have it)
and a primitive unix system

Once you have got a feeling for the language you can start
reading other people's code, and you are on your own.

True, it is OK to ask here, or to ask a friend, or to pay
a teacher, but if you want it, you can learn it on your
own without any risks.

Jun 23 '06 #16

P: n/a

Richard Heathfield wrote:
goose said:
Richard Heathfield wrote:
> and going along on my own trying to learn c.

And that's your second.

Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it /right/. I
wish I'd had comp.lang.c at my disposal whilst I was learning C the first
time. Then I wouldn't have had to learn it all over again.


When it comes to programming languages, well, yes its perfectly
possible to pick up horrid little habits and have them reinforced
by your platform (or textbook).

However, short of serving apprenticeship with an experienced
and well-read (including usenet here!) mentor, most people have
their bad habits reinforced by their tutor (Another poster pointed
out "the world is turbo C" problem elsethread).

Learning on your own forces one to seek help, and a good indicator
of the quality of help you are getting is the pedantic-ness of the
help-giver, hence I rapidly took to lurking in clc (and occassionaly
posting) for the past 10 years or thereabouts. I knew a little
C when I got here and quickly learned that I knew even less than
I thought :-)
I'm currently learning
another programming language, and I've not paid a
tutor, nor enrolled in any course.
But here you are in comp.lang.c - so you're not alone any more. :-)


Sadly, the language I'm attempting to learn is lisp, and clc
comes nowhere close to comp.lang.lisp when it comes to
inflammatory, pedantic and, most frustratingly, *arrogantly correct*
regulars!

<snipped>

No, it's a great idea - but how do you know you're learning the right stuff?
With feedback from people whose knowledge you trust to be right, that's
how.
The problem is "how to know who to trust?". I'd instinctively be
inclined
to trust any teacher that says "Here are a bunch of experts in this
field,
feel free to read everything they write" and pointed to clc, but thats
only
*because* I already know that clc (and most of the comp.lang groups)
regulars tend to be fiercly correct, even when they have to lose face
to
do so.
Or if you don't trust their knowledge, at least you can trust the end
product of their Standard-based debating. We might not get it perfectly
right all the time, but the few cases where we as a group get it wrong it
are probably /so/ few and /so/ obscure that it actually doesn't matter.
Compare this to a book, where mostly you're trusting to the bookshop's
opinion of the author ("does this guy sell well enough to justify shelf
space?" rather than "does this guy know C?").


The internet was a boon in this regard at least; I know anytime I want
to learn a language (no matter what the language *is*), I can go to the
relevant newsgroup and ask for recommendations of books; I've not
yet purchased a dud as a result of this (and yes, I *would* recognise
a dud if I saw it :-).
anyway, nice OT discussion, but perhaps further posts to this thread
should be followed up to a /teaching/ newsgroup?

goose

Jun 23 '06 #17

P: n/a
"jacob navia" <ja***@jacob.remcomp.fr> wrote in message
news:44*********************@news.orange.fr...
I do not agree at all

You can learn C with a book and a C compiler.
Many people have done this, and K & R book is quite readable.

I learned it that way, using K & R (french edition, I still have it)
and a primitive unix system

Once you have got a feeling for the language you can start
reading other people's code, and you are on your own.

True, it is OK to ask here, or to ask a friend, or to pay
a teacher, but if you want it, you can learn it on your
own without any risks.


The only risk is that you choose a bad book to learn from. In my experience
it is hard to unlearn something that you have leared but which is incorrect.
Jun 23 '06 #18

P: n/a
Richard Heathfield wrote:
goose said:

Now I'm curious! Whats wrong with trying to learn
something on your own[1]?


Because you have no way of knowing whether you're learning it right.
I wish I'd had comp.lang.c at my disposal whilst I was learning C the
first time. Then I wouldn't have had to learn it all over again.


I knew a lot more about C before I started reading this newsgroup. It
took me some time to recover.


Brian


Jun 23 '06 #19

P: n/a
jacob navia said:
I do not agree at all
With what? With whom?
You can learn C with a book and a C compiler.


Yes, but it's not a bright idea to learn C using /only/ a book and a C
compiler. How do you know it's a good book? You don't. (OP is a case in
point.) How do you know it's a good compiler? You don't. Feedback from, and
interaction with, the C community is a Good Thing.

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #20

P: n/a
goose said:

<snip>
Learning on your own forces one to seek help,


....at which point you are no longer on your own. Kinda my point, really. But
help is not sufficient. It has to be the right kind of help (as the rest of
your reply shows that you understand all too well).

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 23 '06 #21

P: n/a

"Richard Heathfield" <in*****@invalid.invalid> wrote in message
news:ho********************@bt.com...
jacob navia said:
I do not agree at all


With what? With whom?
You can learn C with a book and a C compiler.


Yes, but it's not a bright idea to learn C using /only/ a book and a C
compiler. How do you know it's a good book? You don't. (OP is a case in
point.) How do you know it's a good compiler? You don't. Feedback from,
and
interaction with, the C community is a Good Thing.

I learnt C with a book and a compiler.
The book was called "C by Yourself" and came with Microsoft Quick C. I
remember being deeply puzzled why there was no fputw() or file put word to
go with fputc(). It wasn't a brilliant book. But it allowed me to get C
programs up an running.

As for compilers, they generally work. For learning exercises efficiency
doesn't usually matter.
--
Buy my book 12 Common Atheist Arguments (refuted)
$1.25 download or $7.20 paper, available www.lulu.com/bgy1mm
Jun 24 '06 #22

P: n/a
On 23 Jun 2006 13:09:48 +0200, Asbjørn Sæbø <as***@stud.ntnu.no>
wrote:
Richard Heathfield <in*****@invalid.invalid> writes:
pencilneck said:
> yes,
>
> i'm reading the book "practical c programming"


That's your first mistake.


This made me curious. This is the O'Reilly book, isn't it?
I do no see it on your website list of recommended books, either.
Do you not consider it a good book? And if so, why?

Because it's a bad book <g>. I looked at it some time ago, and found
numerous errors even on casual inspection. There's another called
"Practical C++ Programming" which I actually purchased off a
half-price rack. I spent about fifteen minutes before putting it in
the trash, for fear that someone less experienced might see it.

It's a shame, really - I used to figure that if O'Reilly published a
book, it was probably worth reading.

--
Al Balmer
Sun City, AZ
Jun 24 '06 #23

P: n/a
Hi,

Richard Heathfield wrote:
Perhaps someone who actually has a copy will be kind enough to refresh my
memory about *precisely* what's wrong with it.


That would actually be very interesting. I just got done refreshing my
college class c with this book and IMHO its a good and interesting read.

So, who wants to enlighten me about what I just learned wrong? :)

Christoph
Jun 25 '06 #24

P: n/a

Richard Heathfield wrote:
Asbjørn Sæbø said:
Richard Heathfield <in*****@invalid.invalid> writes:
pencilneck said:

> yes,
>
> i'm reading the book "practical c programming"

That's your first mistake.
This made me curious. This is the O'Reilly book, isn't it?


Yes.
I do no see it on your website list of recommended books, either.


Right.
Do you not consider it a good book?


No.
And if so, why?


I can't remember. :-) I don't actually have a copy myself, but I used to
include it on my list of recommended books a few years ago, purely on the
basis that others were recommending it here in clc and nobody seemed to
object (so that was silly of me, wasn't it?); then, one day, I saw a copy
kicking around at work, and spent a lunchbreak flicking through it.

Oh deary deary me.

I can't be specific, I'm afraid, about the errors I found, because I didn't
bother to record them at the time. And I do understand that all books will
contain /some/ errors. But this book had the wrong *kinds* of errors - they
weren't just typos, or even thinkos. They were basic and fundamental
misunderstandings about the nature of C.

As soon as I got home, I immediately took the book off my list.

Perhaps someone who actually has a copy will be kind enough to refresh my
memory about *precisely* what's wrong with it.


Damn, I've only written one C program and I used that book
as a guide. But since I'm the only user of the program,
portability isn't an issue and it seems to work perfectly,
should I be concerned?


Or, if I ever see a copy in a bookshop again, I'll flick through it and take
some notes. I don't recall seeing it for years, though.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)


Jun 25 '06 #25

P: n/a
me********@aol.com said:

<snip>
Damn, I've only written one C program and I used that book
as a guide. But since I'm the only user of the program,
portability isn't an issue and it seems to work perfectly,
should I be concerned?


I don't know, obviously. "Probably not, but who knows?" is the only rational
answer I can give you, I'm afraid.

I guess the best advice I can offer is: if your program ain't broke, don't
fix it.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jun 25 '06 #26

P: n/a
On 2006-06-25, me********@aol.com <me********@aol.com> wrote:

Richard Heathfield wrote:
Asbjørn Sæbø said:
> Richard Heathfield <in*****@invalid.invalid> writes:
>
>> pencilneck said:
>>
>> > yes,
>> >
>> > i'm reading the book "practical c programming"
>>
>> That's your first mistake.
>
> This made me curious. This is the O'Reilly book, isn't it?


Yes.
> I do no see it on your website list of recommended books, either.


Right.
> Do you not consider it a good book?


No.
> And if so, why?


I can't remember. :-) I don't actually have a copy myself, but I used to
include it on my list of recommended books a few years ago, purely on the
basis that others were recommending it here in clc and nobody seemed to
object (so that was silly of me, wasn't it?); then, one day, I saw a copy
kicking around at work, and spent a lunchbreak flicking through it.

Oh deary deary me.

I can't be specific, I'm afraid, about the errors I found, because I didn't
bother to record them at the time. And I do understand that all books will
contain /some/ errors. But this book had the wrong *kinds* of errors - they
weren't just typos, or even thinkos. They were basic and fundamental
misunderstandings about the nature of C.

As soon as I got home, I immediately took the book off my list.

Perhaps someone who actually has a copy will be kind enough to refresh my
memory about *precisely* what's wrong with it.


Damn, I've only written one C program and I used that book
as a guide. But since I'm the only user of the program,
portability isn't an issue and it seems to work perfectly,
should I be concerned?


If it's your first and only C program, I assume it's relatively tiny. You
could post it here (in another thread) for commenting.

I wouldn't be concerned if I were you, although I'd learn C properly if I
planned to use it a lot. Just hang around this group for a few weeks and
you'll see a lot of common blunders, and advice on avoiding them.

--
Andrew Poelstra < http://www.wpsoftware.net/blog >
To email me, use "apoelstra" at the above address.
I know that area of town like the back of my head.
Jun 25 '06 #27

P: n/a
On Fri, 23 Jun 2006 11:29:42 +0000, Richard Heathfield
<in*****@invalid.invalid> wrote:
Asbjørn Sæbø said:
Richard Heathfield <in*****@invalid.invalid> writes:
pencilneck said:

> yes,
>
> i'm reading the book "practical c programming"

That's your first mistake.
This made me curious. This is the O'Reilly book, isn't it?


Yes.
I do no see it on your website list of recommended books, either.


Right.
Do you not consider it a good book?


No.
And if so, why?


I can't remember. :-) I don't actually have a copy myself, but I used to
include it on my list of recommended books a few years ago, purely on the
basis that others were recommending it here in clc and nobody seemed to
object (so that was silly of me, wasn't it?); then, one day, I saw a copy
kicking around at work, and spent a lunchbreak flicking through it.

Oh deary deary me.

I can't be specific, I'm afraid, about the errors I found, because I didn't
bother to record them at the time. And I do understand that all books will
contain /some/ errors. But this book had the wrong *kinds* of errors - they
weren't just typos, or even thinkos. They were basic and fundamental
misunderstandings about the nature of C.


That was the case with the C++ book, too. I didn't read much of it
before throwing it away, but I remember that the author confused the
notions of a class and an instance of a class.
As soon as I got home, I immediately took the book off my list.

Perhaps someone who actually has a copy will be kind enough to refresh my
memory about *precisely* what's wrong with it.

Or, if I ever see a copy in a bookshop again, I'll flick through it and take
some notes. I don't recall seeing it for years, though.


--
Al Balmer
Sun City, AZ
Jun 25 '06 #28

P: n/a
me********@aol.com wrote:
Damn, I've only written one C program and I used that book
as a guide. But since I'm the only user of the program,
portability isn't an issue and it seems to work perfectly,
should I be concerned?


That depends on whether you want to learn your compiler,
or learn the C programming language.

--
pete
Jun 25 '06 #29

P: n/a

Andrew Poelstra wrote:
On 2006-06-25, me********@aol.com <me********@aol.com> wrote:

Richard Heathfield wrote:
Asbjørn Sæbø said:

> Richard Heathfield <in*****@invalid.invalid> writes:
>
>> pencilneck said:
>>
>> > yes,
>> >
>> > i'm reading the book "practical c programming"
>>
>> That's your first mistake.
>
> This made me curious. This is the O'Reilly book, isn't it?

Yes.

> I do no see it on your website list of recommended books, either.

Right.

> Do you not consider it a good book?

No.

> And if so, why?

I can't remember. :-) I don't actually have a copy myself, but I usedto
include it on my list of recommended books a few years ago, purely on the
basis that others were recommending it here in clc and nobody seemed to
object (so that was silly of me, wasn't it?); then, one day, I saw a copy
kicking around at work, and spent a lunchbreak flicking through it.

Oh deary deary me.

I can't be specific, I'm afraid, about the errors I found, because I didn't
bother to record them at the time. And I do understand that all books will
contain /some/ errors. But this book had the wrong *kinds* of errors -they
weren't just typos, or even thinkos. They were basic and fundamental
misunderstandings about the nature of C.

As soon as I got home, I immediately took the book off my list.

Perhaps someone who actually has a copy will be kind enough to refreshmy
memory about *precisely* what's wrong with it.
Damn, I've only written one C program and I used that book
as a guide. But since I'm the only user of the program,
portability isn't an issue and it seems to work perfectly,
should I be concerned?


If it's your first and only C program, I assume it's relatively tiny.
You could post it here (in another thread) for commenting.


Well, it's my first non-trivial program. It's about 750 lines.
A little too much to expect anyone to comment on.

I wouldn't be concerned if I were you, although I'd learn C properly if I
planned to use it a lot. Just hang around this group for a few weeks and
you'll see a lot of common blunders, and advice on avoiding them.
Ok, I'll worry when I get errors I can't resolve. Thing is, I don't
plan to
use C very much. I'll just try to remember that the examples in the
book may not be the best.

Thanks for the comments, to you and everyone else.

--
Andrew Poelstra < http://www.wpsoftware.net/blog >
To email me, use "apoelstra" at the above address.
I know that area of town like the back of my head.


Jun 26 '06 #30

This discussion thread is closed

Replies have been disabled for this discussion.