# Hello, world

**"Hello, World!"** is a small computer program that prints the phrase "Hello, World!" to a display, written as the traditional first program when learning a new programming language or testing a new environment. It is usually the simplest program that produces visible output, which makes it a check that the language's tools are installed and working before any real code is attempted.<sup>[1](https://exercism.org/tracks/java/exercises/hello-world)</sup>

| Key fact | Detail |
|---|---|
| First known appearance | 1972, in Brian Kernighan's internal Bell Labs memorandum *A Tutorial Introduction to the Language B*<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup> |
| Original wording | Lowercase "hello, world" with a comma, no capital letters and no exclamation mark<sup>[3](https://helloworlds.io/origins)</sup><sup> • </sup><sup>[4](https://oiu.edu.sd/frontend/web/uploads/lecturess/ce6187e0df95d8fb3193f865585e6a16.pdf)</sup> |
| Popularizing text | *The C Programming Language* (1978) by Kernighan and Dennis Ritchie, whose first example program prints "hello, world"<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup><sup> • </sup><sup>[5](https://c-program-example.com/2011/10/kr-c-program-exercise-1-01a.html)</sup> |
| Purpose | Demonstrate that the language works, that output is possible, and that the toolchain is set up correctly<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup><sup> • </sup><sup>[3](https://helloworlds.io/origins)</sup> |
| Modern use | The standard first exercise in tutorials, textbooks, and learning platforms such as Exercism and university courses<sup>[1](https://exercism.org/tracks/java/exercises/hello-world)</sup><sup> • </sup><sup>[6](https://www.cs.princeton.edu/~cos125/summer24/assignments/hello/specification.php)</sup> |

## Origin at Bell Labs

The line was first printed in 1972 by [Brian Kernighan](https://www.edgepedia.org/brian-kernighan), a researcher at [Bell Labs](https://www.edgepedia.org/bell-labs), in an internal memorandum titled *A Tutorial Introduction to the Language B*. He wanted the simplest possible program that did something visible: print a greeting and prove that the toolchain worked.<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup> The exact phrase "hello, world", lowercase and with a comma, appeared in this tutorial as the canonical example of a minimal working program.<sup>[3](https://helloworlds.io/origins)</sup> Kernighan has said he barely remembers choosing the phrase.<sup>[7](https://helloworldthebook.com/story/)</sup>

A second Kernighan memorandum, *Programming in C: A Tutorial* (1974), also used the example, and the C-language version of the program was inherited from it.<sup>[4](https://oiu.edu.sd/frontend/web/uploads/lecturess/ce6187e0df95d8fb3193f865585e6a16.pdf)</sup>

## The C Programming Language and spread

In 1978, Kernighan and [Dennis Ritchie](https://www.edgepedia.org/dennis-ritchie), the designer of C, put "hello, world" on the first page of *The C Programming Language*. The book sold millions of copies, and its first example program printed the string "hello, world".<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup><sup> • </sup><sup>[5](https://c-program-example.com/2011/10/kr-c-program-exercise-1-01a.html)</sup> After that, programming tutorials overwhelmingly began in the same place.<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup>

The phrase predates its use as a program's output in one related setting: at [Dartmouth College](https://www.edgepedia.org/dartmouth-college) in the 1960s, the designers of BASIC considered using HELLO and GOODBYE in place of LOGON and LOGOFF as part of a syntax built from common words.<sup>[8](https://time.com/69316/basic/)</sup>

## Use in teaching today

More than forty years after the K&R book, "Hello, World!" is still the first program written in Python, JavaScript, Rust, Go, Swift, Kotlin, and other languages that ship with a compiler and a printable string.<sup>[2](https://www.helloworld.amsterdam/why-the-name)</sup> Exercism, a code-practice platform, makes it the first exercise of its Java track and calls it "the traditional first program for beginning programming in a new language or environment"; completing it unlocks the rest of the track.<sup>[1](https://exercism.org/tracks/java/exercises/hello-world)</sup> Princeton's introductory COS 126 course opens with a Java assignment in which students write a program `HelloWorld.java` that prints the phrase, before moving on to programs that take command-line arguments.<sup>[6](https://www.cs.princeton.edu/~cos125/summer24/assignments/hello/specification.php)</sup>

Because the program is so simple in most languages, it is used to illustrate the basic syntax of a working program, which is why it is often the very first program people write.<sup>[4](https://oiu.edu.sd/frontend/web/uploads/lecturess/ce6187e0df95d8fb3193f865585e6a16.pdf)</sup> The original B-language version illustrated external variables; the C version in K&R consists of a `main` function calling `printf` with the string "hello, world\n", and even small details of that version, such as the trailing newline that POSIX text output conventionally requires, have become standard teaching points.<sup>[3](https://helloworlds.io/origins)</sup><sup> • </sup><sup>[5](https://c-program-example.com/2011/10/kr-c-program-exercise-1-01a.html)</sup>

## Cultural reach

The two words have become a recognizable shorthand for the start of a programming career and for a first contact with a new system. A one-card "HELLO WORLD" program exists for the vintage IBM 1401 mainframe at the [Computer History Museum](https://www.edgepedia.org/computer-history-museum), printing the line on the 1403 printer each time the Start button is pressed after the card is loaded.<sup>[9](https://ibm1401.computerhistory.org/DemoProgs.html)</sup> Collections of the program in over 200 programming languages have been assembled, and the phrase has been used as the title of books on computing and algorithms.<sup>[10](https://www.cs.princeton.edu/courses/archive/fall05/cos126/checklist/hello.html)</sup><sup> • </sup><sup>[11](https://e-edu.nbu.bg/pluginfile.php/993798/mod_resource/content/1/Hannah_Fry%20-%20HELLO%20WORLD%20-%20How%20algorithms%20will%20decide%20our%20future%202018.pdf)</sup>

## References

1. [Hello World, Exercism Java track](https://exercism.org/tracks/java/exercises/hello-world)
2. [Why the name? The story behind Hello World](https://www.helloworld.amsterdam/why-the-name)
3. [The Origins of "Hello, World!", helloworlds.io](https://helloworlds.io/origins)
4. [Programming Fundamentals (course PDF), Omdurman Islamic University](https://oiu.edu.sd/frontend/web/uploads/lecturess/ce6187e0df95d8fb3193f865585e6a16.pdf)
5. [K&R C Exercise 1-1a: The "hello, world" Program, C Program Examples](https://c-program-example.com/2011/10/kr-c-program-exercise-1-01a.html)
6. [Programming Assignment 1: Hello, World, COS 126, Princeton University](https://www.cs.princeton.edu/~cos125/summer24/assignments/hello/specification.php)
7. [The Story Behind Hello, World!, helloworldthebook.com](https://helloworldthebook.com/story/)
8. [Fifty Years of BASIC, Time](https://time.com/69316/basic/)
9. [Demo Programs, IBM 1401, Computer History Museum](https://ibm1401.computerhistory.org/DemoProgs.html)
10. [Programming Assignment Checklist: Hello World, COS 126 Fall 2005, Princeton University](https://www.cs.princeton.edu/courses/archive/fall05/cos126/checklist/hello.html)
11. [Hannah Fry, *Hello World: How Algorithms Will Decide Our Future* (2018), PDF](https://e-edu.nbu.bg/pluginfile.php/993798/mod_resource/content/1/Hannah_Fry%20-%20HELLO%20WORLD%20-%20How%20algorithms%20will%20decide%20our%20future%202018.pdf)

---
*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Software and programming › Programming languages › Paradigms, classification, and history*

*Initially written Sep 17, 2026 · Reviewed: Sep 19, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
