C beginners course wiki Re: [Courses] [C] common keywords

Laurel Fan laurel at sdf.lonestar.org
Fri Dec 13 13:18:35 EST 2002


Here's some feedback:

http://www.surgo.net/c_tut/ch01.html:

I would also mention emacs, but that's just because I like emacs :).
Perhaps a list of links to 5 or so of the most popular text editors
will be useful here.

http://www.surgo.net/c_tut/ch01s02.html:

The popularity of C is also good because a lot of free (and closed)
software is written in C, so knowing C will help you contribute to
free software.

Java is not technically interpreted; it is compiled to byte code.

To further complicate things, you can generate both byte code and C
code from perl...

http://www.surgo.net/c_tut/ch01s03.html:

This is kind of nitpicking here, but the range of a signed int is
min: - 2^31    = -2,147,483,648
max: 2^31 - 1  =  2,147,483,647

The reason that min != max is due to an implementation detail of
signed integers (and is irrelevant to the tutorial; I can explain it
if anyone's interested.).  If you think about it, encoding a range
between -n and +n in binary is inefficient, because this is not a
power of 2.  You can verify these limits and others by looking in
/usr/include/limits.h

I would include an example or two of a declaration and initialization
of each of the types you present, such as:

int x = -1;

unsigned int u = -1;

char c = 'a';

char *str = "abc";

etc...

Since we're just at the beginning, readers will not know how to use
these declarations, but it may help them mentally link back to the
definitions when they are introduced again in a later section.

http://www.surgo.net/c_tut/ch01s04.html:

I would add another footnote similar to the compile footnote that
explains how to run the new program, such as:

Use "./filename" to run the program.

Readers might be confused if they are not very familiar with PATHs, or
if they happen to have named the program something that already exists
(such as test...).

Include files are usually located (in linux, at least) in
/usr/include, not /usr/share/include.

http://www.surgo.net/c_tut/apa.html:

I would put in references to the manpages for the ascii character
codes (ascii(7)).

http://www.surgo.net/c_tut/apb.html

It might be fun to include \a (the escape code for bell).  When I TA'd
a introductory C programming class in college, some students seemed to
enjoy this escape character (though others sitting beside them did not
:)).

-- 
laurel at sdf.lonestar.org
http://dreadnought.gorgorg.org



More information about the Courses mailing list