The IT Crowd Theme in C
Inspired by VIznut, in the last few days I have experimented with music creation using a C compiler. This morning, I chose to write small program playing a melody not entirely unlike the theme of The IT Crowd when piped to /dev/dsp. True to the spirit of the intro, it ends with a division by zero.
#include <stdio.h>
main() {long int t;for(t=0;;t++) {fputc((int)(
(0/(128000-t))|(((t<92000)*0xff)&
(t%2000*(" $& %' '% %$"[t%32000/2000]-32)
|t%2000*("$$ %% '' %% "[t%32000/2000]-32)/2)|
(t%2000*("'&"[t%92000/2000]-32)&(t>92000&&t<96000)*0xff)|
(t%4000*("'&(&*$,* "[t%96000/4000]-32)&(t>96000)*0xff))
), stdout);}}
Much smaller version that sounds even better:
#include <stdio.h>
main() {long int t;for(t=0;;t++) {fputc((int)((1/(128000-t))|(t>96e3)?t%4000*("'&(&*$,*"[t%96000/4000]-32):(t%2000*
("$$$&%%%''''%%%'&"[t%32000/2000]-32-(2*((t>28e3)&(t<32e3)))))/(1+(t%8000<4e3))), stdout);}}