C Notes and Sample Programs

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 pretty wild 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.

Last update: 2009 January 22