main(p,c){for(p=0;c=~getchar();printf(" %02x"+(p++%16!=8),~c))p%16||printf("\n%08x:"+!p,p);puts("");} Contributors of shortness to this include: Rob Mayoff John Dawson Britt Yenne We know about puts("") -> puts(0), but that violates portability guarantees unless there's some POSIX thing I don't know about. Dave Burton points out that p can be declared and initialized more efficiently if you don't mind a compiler warning: p;main(c){for(;c=~getchar();printf(" %02x"+(p++%16!=8),~c))p%16||printf("\n%08x:"+!p,p);puts("");} General rules about the program: Output must be character-for-character identical with the above program. (No trailing space, no extra or missing newlines, no unprintable characters...) The program must be completely self-contained - no referring to other files for help. (standard C things like libc functions are fine) The program cannot require being exec()ed in a certain way (strings in arg list or environment are taboo.)