Commissioned for this museum · after the program that opens Kernighan & Ritchie, 1978

hello, world

C·1978·7 lines·76 bytes

Curator’s note

The most reproduced program in history, and nobody owns it.

The version printed in Kernighan and Ritchie is a copyrighted page in a copyrighted book, so what hangs here was typed out again for this museum. That turns out to be almost impossible to do wrongly — the program is so nearly forced by its own requirements that two people writing it independently produce the same characters. It is the rare artifact that is easier to recreate than to reproduce.

Notice the lowercase and the missing exclamation mark. The original is hello, world — a comma, a space, no capital, no punctuation at the end. The shouted, capitalised Hello, World! that everyone remembers is a later mutation, spread by a thousand tutorials copying each other rather than the source. The museum shows the quiet version.

Notice too what a beginner is handed in the first five minutes: a preprocessor directive, a return type, a parameter list that means *no arguments* rather than *unspecified*, a newline written as an escape, and an exit status. Every one is a real concept the language will insist on later. The program is a greeting on the surface and a table of contents underneath.