Write Your First Program, “Hello World” In 25 Different Famous Programming Languages

“Hello World !” — First program every programmers writes when he/she start to learn any programming language.

“Hello World !” is considered to be the one of the simplest piece of programs possible in almost all computer languages, that outputs or displays “Hello, World !” to the user. It is often exemplify the basic syntax of a programming language for a working program and used to introduce beginning programmers to a programming language.

From this article today you are going learn how to write your first program — “Hello World !” program — in 20 different famous programming languages.

Write Your First Computer Program, “Hello World”

1. Hello World Bash:

Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C shells (ksh and csh). Check out a-z Bash command-line for Linux.

#!/bin/sh
echo "Hello, World!"

2. Hello World C:

C is a high-level and general purpose programming language that is ideal for developing firmware or portable applications. Originally intended for writing system software, C was developed at Bell Labs by Dennis Ritchie for the Unix Operating System (OS) in the early 1970s. Also checkout C programming examples every beginner must know.

#include<stdio.h>
main()
{
printf("Hello World");
}

3. Hello World C++:

C++ is a general purpose object oriented programming language developed by Bjarne Stroustrup. It is considered to be an intermediate level language, as it encapsulates both high and low level language features. Initially, the language was called ‘C with classes’ as it had all properties of C language with an additional concept of ‘classes’. However, it was renamed to C++ in 1983.

#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}

4. Hello World C#:

C# is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java. C# is designed to work with Microsoft’s .Net platform.

6. Hello World Go:

Go or Golang is a free and open source programming language created at Google. It is a compiled, statically typed language in the tradition of Algol and C, with garbage collection, limited structural typing, memory safety features and CSP-style concurrent programming features added.

7. Hello World Haskell:

Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry.

module Main (main) where
main = putStrLn "Hello, World!"

8. Hello World Java:

Java is a general-purpose computer programming language first developed by James Gosling at Sun Microsystems, which is now a part of Oracle Corporation. The language has developed much of its syntax from C and C++.

11. Hello World Objective C:

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. This is the main programming language used by Apple for the OS X and iOS operating systems and their respective APIs, Cocoa and Cocoa Touch.

12. Hello World Pascal:

Pascal is an imperative and procedural programming language, which Niklaus Wirth designed in 1968–69 and published in 1970, as a small, efficient language intended to encourage good programming practices using structured programming and data structuring.

program hello;
begin
writeln('Hello, World!');
end.

13. Hello World Perl 6:

Perl 6 is a member of the Perl family of programming languages designed by Larry Wall. It was designed in order to tackle with the caveats that Perl had accumulated during its now long history. Those caveats were mainly due to a requirement of backward compatibility of successive versions of Perl.

say "Hello world!";

14. Hello World PHP:

PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994.

<?php
echo 'Hello, World!';
?>

15. Hello World Python:

Python is an open source programming language made to both look good and be easy to read. A programmer named Guido van Rossum made it in 1991. Python is a good programming language for beginners. It is a high-level language, which means a programmer can focus on what to do instead of how to do it. Writing programs in Python takes less time than in another language.

print "Hello, world!"

16. Hello World Ruby:

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language designed and developed in the mid-1990s by Yukihiro “Matz” Matsumoto in Japan. It supports multiple programming paradigms, including functional, object-oriented, and imperative. It also has a dynamic type system and automatic memory management.

puts "Hello, World!"

17. Hello World Scala:

Scala is a general-purpose programming language. Scala has full support for functional programming and a strong static type system. Designed to be concise, many of Scala’s design decisions were inspired by criticism of Java’s shortcomings.

18. Hello World SQL:

SQL or Structured Query Language is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS).

19. Hello World Swift:

Swift is a general-purpose, multi-paradigm, compiled programming language developed by Apple Inc. for iOS, macOS, watchOS, tvOS, and Linux.

println("Hello World!")

20. Hello World Visual Basic .NET:

Visual Basic .NET (VB.NET) is a multi-paradigm, object-oriented programming language, implemented on the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language.

Imports System
Public Module modmain
Sub Main()
Console.WriteLine ("Hello World using Visual Basic!")
End Sub
End Module

21. Hello World Lisp:

Lisp is the second-oldest high-level programming language after Fortran invented by John McCarthy in 1958. Since from its start, Lisp was closely connected with the artificial intelligence research community. Lisp was used as the implementation of the programming language Micro Planner which was used in the famous AI system SHRDLU. Today, the best known general-purpose Lisp dialects are Common Lisp and Scheme.

(format t "Hello, World!~%")

22. Hello World Kotlin:

Kotlin is a statically-typed programming language that runs on the Java virtual machine for modern multiplatform applications. A team of JetBrains programmers based in Saint Petersburg, Russia is its primary developers. As of Android Studio 3.0 Kotlin is a fully supported programming language on Android.

package demo
fun main(args : Array) {
println("Hello, world!")
}

23. Hello World R:

R is a programming language and free software environment, designed by Ross Ihaka and Robert Gentleman, for statistical computing and graphics that is supported by the R Foundation. One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed.

cat("Hello world\n")

24. Hello World Matlab:

MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and Python.

disp('Hello world')

or

fprintf('Hello, world!')

25. Hello World Delphi:

Delphi is both an object-oriented programming language (OOP) and an Integrated Development Environment (IDE) created by Embarcadero company. It originated from the Pascal language, which then became Object Pascal (Pascal with objects support). Delphi is an alternative to languages such as Visual Basic offering development with both rapidity and good quality.

Founder and Editor-in-chief of TechLog360, who mainly publishes posts related to new technologies, gadgets and open-source world. His main hobbies are web designing, blogging, search engine optimization and making friends.