C Tutorials

  • Thread starter Software Engineer
  • Start date
R

Roger

Software Engineer said:


Which of them do you recommend as the very best of the thousand, and
why?

I have to wonder if Software Engineer even looked at this site. The actual
number of C tutorials is rather small. In fact the count of C and C++
tutorials combined is shown as 76, and of those most are concerned with C++
while others are not tutorials at all (i.e.; "The C Rational" and "The
Development of the C Language").

Which ones would I recommend?

"Programming in C: A Tutorial" by Brian W. Kernighan - A well written
introduction to C. Those who have no prior programming experience may have
difficulty grasping some of the concepts and will need to turn to my next
recommendation...

"The C FAQ" - The student should always check the C FAQ before posting a
question in comp.lang.c

"A Tutorial on Pointers and Arrays in C" by Ted Jensen - This is an
excellent paper. It may be too difficult for the student who has not first
completed "Programming in C" or another similar tutorial.

These are the only tutorials from the site that I am comfortable
recommending.

-Roger
 
B

B. Augestad

Roger said:
(e-mail address removed):




I have to wonder if Software Engineer even looked at this site. The actual
number of C tutorials is rather small. In fact the count of C and C++
tutorials combined is shown as 76, and of those most are concerned with C++
while others are not tutorials at all (i.e.; "The C Rational" and "The
Development of the C Language").

Which ones would I recommend?

"Programming in C: A Tutorial" by Brian W. Kernighan - A well written
introduction to C. Those who have no prior programming experience may have
difficulty grasping some of the concepts and will need to turn to my next
recommendation...

"The C FAQ" - The student should always check the C FAQ before posting a
question in comp.lang.c

"A Tutorial on Pointers and Arrays in C" by Ted Jensen - This is an
excellent paper. It may be too difficult for the student who has not first
completed "Programming in C" or another similar tutorial.

These are the only tutorials from the site that I am comfortable
recommending.

Note that "The C FAQ" on http://tutorial.fyicenter.com is *not* the
comp.lang.c FAQ found at http://c-faq.com/, quite the opposite. ;-)

Bjørn
 
K

Keith Thompson

Roger said:
I have to wonder if Software Engineer even looked at this site. The actual
number of C tutorials is rather small. In fact the count of C and C++
tutorials combined is shown as 76, and of those most are concerned with C++
while others are not tutorials at all (i.e.; "The C Rational" and "The
Development of the C Language").

Which ones would I recommend?

"Programming in C: A Tutorial" by Brian W. Kernighan - A well written
introduction to C. Those who have no prior programming experience may have
difficulty grasping some of the concepts and will need to turn to my next
recommendation...

That tutorial is actually at
<http://www.lysator.liu.se/c/bwk-tutor.html>.
Rather than linking to it, the site instead includes it in a frame,
making it appear to be part of the fyicenter.com site. I wouldn't
quite say this is blatantly dishonest, but it is potentially
misleading, and can make it more difficult to navigate for no good
reason.

Also, anyone reading this should pay close attention to the
disclaimer:

Disclaimer: This ``tutorial'' is presented as a historical
document, not as a tutorial. Although it has lost little of its
didactic value, it describes a language that C compilers today do
no longer understand: the C of 1974, four years before Kernighan
and Ritchie published the first edition of ``The C Programming
Language''.

Get yourself a copy of K&R2 (2nd edition, not 1st edition) to learn
the language. Once you've learned it, you can go back to Kernighan's
tutorial if you're interested in the history.
"The C FAQ" - The student should always check the C FAQ before posting a
question in comp.lang.c

A search for "C FAQ" points to Peter Seebach's infamous IAQ, or
Infrequently Asked Questions List, at
<http://www.plethora.net/~seebs/faqs/c-iaq.html>. The IAQ is
hilarious if you're familiar with C, and mercifully incomprehensible
if you're not. A sample question:

2.4: Why can't you compare structs?

Compare them to what? A summer's day?

And, of course, there's an entire section on null statements.
"A Tutorial on Pointers and Arrays in C" by Ted Jensen - This is an
excellent paper. It may be too difficult for the student who has not first
completed "Programming in C" or another similar tutorial.

<http://home.netcom.com/~tjensen/ptr/pointers.htm>
(It's also available in PDF.)

Hmm. I took a very quick glance at this. It looks good, but I did
find a problem at the beginning of Chapter 2: Pointer types and Arrays:

Okay, let's move on. Let us consider why we need to identify the
type of variable that a pointer points to, as in:

int *ptr;

One reason for doing this is so that later, once ptr "points to"
something, if we write:

*ptr = 2;

the compiler will know how many bytes to copy into that memory
location pointed to by ptr. If ptr was declared as pointing to an
integer, 4 bytes would be copied. Similarly for floats and
doubles the appropriate number will be copied. But, defining the
type that the pointer points to permits a number of other
interesting ways a compiler can interpret code. For example,
consider a block in memory consisting if ten integers in a
row. That is, 40 bytes of memory are set aside to hold 10
integers.

This confuses "integer" (a set of types) with "int" (one specific
integer type), *and* it assumes that sizeof(int) == 4.

Chapter 1 shows a program that displays the sizes of the various
integer types, and says that "This document assumes the use of a 32
bit system with 4 byte integers." It's good that the author
documented the assumption, but it would have been better not to make
any assumption in the first place.
These are the only tutorials from the site that I am comfortable
recommending.

As far as I can tell, none of the tutorials are "from the site"; the
site just links to them.
 

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