Hello World in Different Languages

By | July 31, 2016

Learn how to write hello world in different languages. Here, we have a compilation of 10+ programming languages which helps you identify which one is easier to start your programming career with! 😉

The Hello World program is one of the very first programs that every programming student begins his journey in programming. The alternative to Hello World is Game Over program which is also one of the very famous programs.

The Hello World is one of the simplest programs that help the novice programmer to understand the basic syntax of the programming language and basically to get a feel of the programming environment.

Hello World in Different Languages

C

#include<stdio.h>

int main()
{
      printf("Hello World in C\n");
      return 0;
}

Must Read: C Program To Print Hello World in Linux

Swift

println("Hello World in Swift")

C++

#include<iostream>

using namespace std;

int main()
{
      cout << "Hello World in C++";
      return 0;
}

Basic

PRINT "Hello World in Basic"

D

import std.stdio;

void main() 
{
      writeln("Hello World in D");
}

Java

import java.io.*;

class helloWorld
{
      public static void main(String args[])
      {
            System.out.println("Hello World in Java\n");
      }
}

Visual Basic

Sub Main()
      MessageBox("Hello World in Visual Basic")
End Sub

jQuery

<!DOCTYPE HTML>
<html>
<head>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
      <script>
            $(document).ready(function()
            {
                  $("#placeholder").text("Hello World in jQuery");
            });
      </script>
</head>
<body>
      <div id="placeholder">
      </div>
</body>
</html>

HTML

<!DOCTYPE HTML>
<html>
      <head>Hello World Program in HTML</head>
      <body>
            <p>Hello World in HTML5</p>
      </body>
</html>

PHP

<!DOCTYPE html>
<html>
      <head>Hello World Program in PHP</head>
      <body>
            <?php
                  echo "Hello World in PHP";
            ?>
      </body>
</html>

Visual Fox Pro

? "Hello World in Visual Fox Pro"

Python

print("Hello World in Python\n");

Javascript

<!DOCTYPE HTML>
<html>
      <head>Hello World Program in Javascript</head>
      <body>
            <script type="text/javascript">
                  document.writeln("Hello World in Javascript");
            </script>
      </body>
</html>

Bash / DOS

echo "Hello World in Bash"

 Perl

print "Hello World in Perl\n";

R

print("Hello World in R")

Go

package main

import "fmt"

func main() 
{
      fmt.Printf("Hello World in Go")
}

Pascal

program HelloWorldinPascal;

begin
      writeln('Hello World in Pascal');
end

Ruby

puts "Hello World in Ruby"

If you have any other code for hello world in different languages, please feel free to mention them in the comment section below. You must check Wikipedia article to know the history of hello world.

3 thoughts on “Hello World in Different Languages

  1. Pankaj Gandhi

    Wow. Excellent Compilation of so many hello world programs. Nice work.

    Reply
  2. Akash Katare

    Thanks for so many hello world programs in different languages.

    Reply
  3. Vishal Narang

    This is just Amazing. It helps to compare different programming languages within a minute. Thanks a lot.

    Reply

Let's Discuss