Hello, world

  • Sprouting
  • c.

A “hello, world” program’s sole objective is to output the string "hello, world". It is often used to measure the ease-of-use when comparing programming languages.

Example

C

A “hello, world” program written in 6 line(s) of code.

#include <stdio.h>
int main()
{
printf("hello, world\n");
}

Go

A “hello, world” program written in 7 line(s) of code.

package main
import "fmt"
func main() {
fmt.Println("hello, world")
}

Haskell

A “hello, world” program written in 1 line(s) of code.

main = putStrLn "hello, world"

Python

A “hello, world” program written in 1 line(s) of code.

print("hello, world")

Rust

A “hello, world” program written in 3 line(s) of code.

fn main() {
println!("hello, world");
}