Is this a good C tutorial?

S

Subra

At_sea_with_C said:
Hello,

I'm considering reading some C tutorials. I found this one.

http://www.crasseux.com/books/ctutorial/
(The GNU C Programming Tutorial)

Can anyone tell me if it is good or not? Also do you have any other
recommendations for other good tutorials?

Thanks a lot.

Start reading and experimenting with K&R C. You will be a master !@c
 
S

santosh

Subra said:
Start reading and experimenting with K&R C. You will be a master !@c

K&R C is obsolete. Telling the OP to learn it, instead of ISO C, is
incredibly bad advice.

To the OP:
The book at the link seems to be pretty decent. I'll look at it in
more detail later. Try the following tutorial also, (by a regular of
this group):

<http://www.eskimo.com/~scs/cclass/>
 
S

santosh

Nick said:
but the latest version of K&R (2nd edition) describes ISO C.

<snip>

Apologies to Subra. I didn't read his post properly. I mistook his
sentence to mean that he was recommending pre-ANSI K&R C, (the
language).

Rereading it, it's obvious he meant K&R, (the book), which is
excellent advice, though the OP did ask for tutorials.
 
D

Duncan Muirhead

Hello,

I'm considering reading some C tutorials. I found this one.

http://www.crasseux.com/books/ctutorial/
(The GNU C Programming Tutorial)

Can anyone tell me if it is good or not? Also do you have any other
recommendations for other good tutorials?

Thanks a lot.
I had a brief look at one section "Advanced operators" and found some
mistakes (typos maybe but confusing none the less).
In the subsection on the comma operator: "You can separate almost any
kind of C statment from another with a comma operator. The comma-separated
expressions are evaluated from left to right and the value...".
But the comma operator separates expressions, not statements.

In the subsection "Hidden operators and values"
"The value of an expression is the result of the operation carried out in
the expression. Increment and decrement statements have a value that is
one greater than or one less than the value of the variable they act upon,
respectively.
Consider the following two statements:
c = 5;
c++;
The expression c++ in the above context has the value 6.
"
No, it has the value 5, and after the above c has the value 6.
The value of an expression is *not* always the result of the operation.
And note the confusion in "Increment and decrement statements".

In the subsection "Postfix and prefix ++ and --"
"int my_int = 3;
printf ("%d\n", my_int++);
The increment operator is hidden in the parameter list of the printf call.
The variable my_int has a value before the ++ operator acts on it (3) and
afterwards (4).
Which value is passed to printf? Is my_int incremented before or after
the printf call? This is where the two forms of the operator (postfix and
prefix) come into play.
If the increment or decrement operator is used as a prefix, the operation is
performed before the function call. If the operator is used as a postfix, the
operation is performed after the function call."
I don't think the talk of before/after function call is helpful.
If my_int were a global variable then assuming the increment in
f(my_int++) happened after the call to f() would lead to errors!

I suppose 3 errors (I didn't notice any others) in a section is not too
bad, but I don't think I'd recommend the tutorial.
Duncan
 
F

Flash Gordon

santosh wrote, On 06/03/07 10:55:
K&R C is obsolete. Telling the OP to learn it, instead of ISO C, is
incredibly bad advice.

To the OP:
The book at the link seems to be pretty decent. I'll look at it in
more detail later.

It definitely has some problems. It says to cast the value returned by
malloc and does not tell you to #include <stdlib.h> first. At least, not
in the section about memory allocation. I consider this a serious
failure. Admittedly I only looked where I thought there were most likely
to be errors!
> Try the following tutorial also, (by a regular of
this group):

<http://www.eskimo.com/~scs/cclass/>

This and K&R2 are good references. K&R2 is well worth the money and I
still refer to it. Also for reference the comp.lang.c FAQ at
http://c-faq.com/
 
A

arnuld

Hello,

I'm considering reading some C tutorials. I found this one.

http://www.crasseux.com/books/ctutorial/
(The GNU C Programming Tutorial)

Can anyone tell me if it is good or not? Also do you have any other
recommendations for other good tutorials?

you will be better with learning from a hard-copy. trust me, online
learning is very different from learning form a hard-copy. i have
tried that and online learning is never a good idea.

In case of hard-copy, nothing beats K&R2. trust me and if that does
not work, try K.N. King.

BTW, the best online source is:

http://www.eskimo.com/~scs/cclass/notes/top.html


- arnuld
http://arnuld.blogspot.com
 
C

CBFalconer

santosh said:
Subra wrote:
.... snip ...

K&R C is obsolete. Telling the OP to learn it, instead of ISO C,
is incredibly bad advice.

No, telling the OP to ignore it is incredibly bad advice. K&R2 is
up to date WRT C90, after including the published errata.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top