“Hello, world!”

We’ve all been here before. When we start learning a language, the first thing we probably get taught to do is to output “Hello, world!” to the console. For some, “Hello, world!” can turn into a new opportunity, a new career, a new life..

But…


This content originally appeared on DEV Community and was authored by Siddharth Chaudhary

We've all been here before. When we start learning a language, the first thing we probably get taught to do is to output "Hello, world!" to the console. For some, "Hello, world!" can turn into a new opportunity, a new career, a new life..

But where did it originate?

The origins of hello world are unclear, but the phrase was first seen in Brian Kernigham’s book in 1972, A Tutorial Introduction to the Language B. After that, it was used in The C Programming Language in 1978, which is what really made the phrase popular.

What it looks like in different languages today

Here is what "Hello, world!" looks like in some of the most popular programming languages today:

Javascript

console.log("Hello, world!")

Python

print("Hello, world!")

Swift

print("Hello, world!")

Ruby

puts "Hello, world!"

Shell

echo 'Hello, world!'

Java

class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}

PHP

echo "Hello World!";

Go

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

C

#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}

C++

#include <iostream>

int main() {
    std::cout << "Hello World!";
    return 0;
}

C#

namespace HelloWorld
{
    class Hello {         
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hello World!");
        }
    }
}

Rust

fn main() {
    println!("Hello World!");
}

Thanks for reading, and I hoped you enjoyed my post on "Hello, world!"

Check out my Website | Twitter | Github


This content originally appeared on DEV Community and was authored by Siddharth Chaudhary


Print Share Comment Cite Upload Translate Updates
APA

Siddharth Chaudhary | Sciencx (2021-12-17T14:24:57+00:00) “Hello, world!”. Retrieved from https://www.scien.cx/2021/12/17/hello-world-13/

MLA
" » “Hello, world!”." Siddharth Chaudhary | Sciencx - Friday December 17, 2021, https://www.scien.cx/2021/12/17/hello-world-13/
HARVARD
Siddharth Chaudhary | Sciencx Friday December 17, 2021 » “Hello, world!”., viewed ,<https://www.scien.cx/2021/12/17/hello-world-13/>
VANCOUVER
Siddharth Chaudhary | Sciencx - » “Hello, world!”. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/17/hello-world-13/
CHICAGO
" » “Hello, world!”." Siddharth Chaudhary | Sciencx - Accessed . https://www.scien.cx/2021/12/17/hello-world-13/
IEEE
" » “Hello, world!”." Siddharth Chaudhary | Sciencx [Online]. Available: https://www.scien.cx/2021/12/17/hello-world-13/. [Accessed: ]
rf:citation
» “Hello, world!” | Siddharth Chaudhary | Sciencx | https://www.scien.cx/2021/12/17/hello-world-13/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.