DEV Community

Cover image for Hello, World!
Aadarsh Kannan
Aadarsh Kannan

Posted on • Updated on

Hello, World!

This is my first blog so I thought I should start this blog by writing Hello, World! just like we do with the programming.

Hello, World!

There is no definitive answer to this question as it is unclear when the first "Hello, World!" program was written. However, it is generally believed that the first "Hello, World!" program was written by Brian Kernighan in 1972.

Hello, World! programs have been written in almost every programming language imaginable. As the first program that many people learn, it is generally simple and straightforward. However, some Hello, World! programs can be quite complex and creative.

One of the earliest Hello, World! programs were written by Tim Berners-Lee, the creator of the World Wide Web. His program simply displayed the text "Hello, world!" on a web page.

Hello, World! programs have been used to demonstrate the power of new programming languages, to test new hardware or software, and even to make political statements. In 2014, the European Organization for Nuclear Research (CERN) released a Hello, World! program that was used to discover the Higgs boson, one of the most important particles in the universe.

Below are some of the implementations of programming language to print Hello, World!
alt text

C

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

CPP

#include <iostream>
int main()
{
  std::cout << "Hello, World!";
  return 0;
}
Enter fullscreen mode Exit fullscreen mode

Javascript

console.log("Hello, World!");
Enter fullscreen mode Exit fullscreen mode

Python

print("Hello, World!")
Enter fullscreen mode Exit fullscreen mode

Java

public class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!");
   }
}
Enter fullscreen mode Exit fullscreen mode

Julia

println("Hello, World!")
Enter fullscreen mode Exit fullscreen mode

C#

using System;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
        }
    }
}
Enter fullscreen mode Exit fullscreen mode

GoLang

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
Enter fullscreen mode Exit fullscreen mode

Verilog

module HELLO_WORLD(); 
  initial begin
    $display("Hello World");
    $finish; 
  end
endmodule
Enter fullscreen mode Exit fullscreen mode

Hello, World! programs will continue to be written as long as there are new programming languages to learn and new hardware to test. They will always be a part of the computer world, and will likely remain one of the most popular ways to learn a new programming language.

That's the end of this article! Hope you liked it!

Top comments (5)

Collapse
 
pauljlucas profile image
Paul J. Lucas

The first known Hello, World! program was written by Brian Kernighan and Dennis Ritchie, the creators of the C programming language, in 1972.

No, it's not. The first known use was in fact by Brian Kernighan (without Ritchie), but it was in an example for C's grandparent language of B. See here, section 7. The hello, world program was popularized by K&R in The C Programming Language, but did not originate with it.

Collapse
 
engineeredsoul profile image
Aadarsh Kannan

Thanks for the information!

Collapse
 
krishnaagarwal profile image
Krishna Agarwal

GitHub logo MrKrishnaAgarwal / Hello-World-18-Languages

Hello World In 18 Languages (Easy for beginners to understand syntax) - Basic Project

Hello-World-in-18-Languages

Hello World in:

Wrapping Up!

Well, it’s quite fun to print the HELLO WORLD in different programming languages however, it’s informative too.

In programming, there are numerous techniques to code a single program. I hope, you enjoyed this repository and learned new languages with their basic syntax too.

πŸ‘¨β€πŸ’» Keep learning and Keep Coding πŸ‘©β€πŸ’»




Collapse
 
tccodez profile image
Tim Carey

Ruby - puts β€œHello World!”

Collapse
 
pengeszikra profile image
Peter Vivo • Edited

codewars Hello world! kata (JS)

You need to write a function f that returns the string Hello, world!.
Requirement: Every line must have at most 1 character, and total number of lines must be less than 145.

Quite interesting task try it!