- Operator precedence, sequence points, declarations notes.
- Declaration versus definition, scope, linkage notes.
- Interesting bits from stdio.h.
- sum, a very simple C program.
- token, a lexical analyzer and switch example.
- Valid pointer operations.
- Argument processing example that does not use getopt(). Getopt() should be used instead.
- Dynamic memory allocation (malloc) notes. Various public domain malloc replacements are available, which are useful for debugging.
- Handling arbitrary length lines with realloc() example.
- structure notes and a linked list example.
- qsort( ) example which also illustrates function pointers.
- Variable number of arguments example.
- Multi-dimensional arrays notes.
- Some useful library functions.
- Warning (to myself) about pseudo random number generators.
In C it is possible to write some pretty idiotic obscure code, such as this cute 12days.c (origin unknown). In a similar silly vein, there are self-printing C programs and a palandromic verse one c.otto.c.
C has a preprocessor (macro expander). A more capable macro expander is m4. One can do some prettywild weird things with it; here's how to define a for loop in m4, but be careful because the back quote ` and forward quote ' may not appear correctly in your browser. In m4 a quoted string starts with a back quote and ends with a forward quote. This html page was generated from m4 source text.
No comments:
Post a Comment