Richard said:
Flash Gordon said:
Hardly a killer. After all, K&R2 does this as well.
I agree. If all that was wrong was a few old fashioned definitions it
would be worth pointing out but would not be a reason to avoid it.
That's rather more serious. Taken with the other issues you mentioned, it's
enough to scupper any tutorial.
Which is why I considered a brief critique worth the effort.
What makes it worse is it is apparently a course that was run at this
educational establishment in the spring of 98. I was about to say that a
later course was a bit better although still having a lot of old
fashioned and out of date stuff for a course in 2006, then I looked more
carefully and saw this
http://www-ee.eng.hawaii.edu/~tep/EE160/Book/chap2/subsection2.1.1.2.html#SECTION0011200000000000000
To be fair, some of the rest of it is not so bad and I saw several
examples that did include stdlib.h. However, then we get to
http://www-ee.eng.hawaii.edu/~tep/EE160/Book/chap7/section2.1.3.html#SECTION0013000000000000000
which says amongst other things:
| ... If the array is an integer array, (float array, character array,
| etc.) then the type of X is int * ( float *, char *, etc.). Thus,
| the declaration of an array causes the compiler to allocate the
| specified number of contiguous cells of the indicated type, as well as
| to allocate an appropriate pointer cell, initialized to point to the
| first cell of the array. This pointer cell is given the name of the
| array.
Then I think, well, that kind of teaching could explain all the effort
people have to go in to on this group to explain the difference between
pointers and arrays.
Some of it is not too bad, but you *really* don't want to know some of
the rest of what I saw.
To be fair it mentioned fgets in the same sentence, but did not
recommend it over fgets.
Your recommendations, on the other hand, I feel no need to check myself
for suitability. Your recommendation would be enough even if I did not
recognise who wrote the first tutorial from the URL.