Rexa's Logo

Hello, World!

2 min readJan 19, 2025

Where does "Hello, World!" come from?

"Hello, World!" is a phrase widely used by programmers around the globe. It has become a tradition to use this phrase as the first program written when learning a new programming language.

The tradition of using "Hello, World!" originated from the book The C Programming Language by Brian Kernighan and Dennis Ritchie, first published in 1978. In this seminal book, a simple code example is presented in the opening chapter that prints "Hello, World!" to the screen. This example was designed to introduce readers to the basic syntax of the C programming language.

Although the phrase gained widespread popularity with this book, earlier variations of simple output programs, such as printing "Hello" can be traced back to older programming tutorials. However, it was Kernighan and Ritchie's work that solidified the use of "Hello, World!" as a tradition in programming education.

Here is an example of "Hello, World!" in different programming languages:

  1. Python
print("Hello, World!")
  1. Go
println("Hello, World!");
  1. JavaScript
console.log("Hello, World!");
  1. C
#include <stdio.h>
 
int main() {
   printf("Hello, World!");
   return 0;
}
  1. C++
#include <iostream>
 
int main() {
    std::cout << "Hello, World!";
    return 0;
}
  1. C#
namespace HelloWorld
{
    class Hello {         
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello, World!");
        }
    }
}
  1. Java
import java.io.*;
 
class GFG {
	public static void main (String[] args) {
	System.out.println("Hello, World!");
	}
}
  1. Assembly
section .data
    msg db 'Hello, World!', 0Ah
 
section .text
    global _start
 
_start:
    mov eax, 4
    mov ebx, 1
    mov ecx, msg
    mov edx, 13
    int 0x80
 
    mov eax, 1
    xor ebx, ebx
    int 0x80
 
  1. Brainfuck
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.