Hello World!

Programmers making a Hello World program.
Programmers making a Hello World program.

What is Hello World?

A "Hello, World!" program is usually a simple computer program that emits (or displays) to the screen (often the console) a message similar to "Hello, World!". A small piece of code in most general-purpose programming languages, this program is used to illustrate a language's basic syntax. Such program is often the first written by a student of a new programming language, but such a program can also be used as a sanity check to ensure that the computer software intended to compile or run source code is correctly installed, and that its operator understands how to use it.

While small test programs have existed since the development of programmable computers, the tradition of using the phrase "Hello, World!" as a test message was influenced by an example program in the 1978 book The C Programming Language, with likely earlier use in BCPL.

"Hello, World!" programs vary in complexity between different languages. In some languages, particularly scripting languages, the "Hello, World!" program can be written as one statement, while in others (more so many low-level languages) many more statements can be required.

Example of Hello World in C:

main( ) {
  printf("hello, world");
}
          

Programming Languages

Name Type
C High-Level
Java High-Level
Python High-Level
Assembly Low-Level

Difference between High and Low-Level Languages

  • High-Level Languages are meant to be understood by humans, using syntax similar to natural language
  • Low-Level Langauges read closer to machine code, requiring programs to write instructions relating to the computer hardware

Quiz

What is the purpose of Hello World?