First article! Definitely must be a “Hello World” examples article. A “Hello World” program is a computer program which prints out “Hello, world!” on a display device. It is used in many introductory tutorials for teaching a programming language.

It is often considered to be tradition among programmers for people attempting to learn a new programming language to write a “Hello World!” program as one of the first steps of learning that particular language. Such a program is typically one of the simplest programs possible in most computer languages.


C example:

int main(void)
printf("Hello, World!\n");
return 0;

C++ example:

using namespace std;
int main()
cout<< "Hello, world!\n";
return 0;

C# example:

 class HelloWorldApp
 static void
 System.Console.WriteLine("Hello, world!");

JavaScript example:

document.write('Hello, world!');
alert('Hello, world!');

Perl example:

print "Hello, world!\n";

PHP example:

<? print "Hello, world!";?>

Pascal example:

program hello;
 writeln('Hello, world!');

SQL example:

CREATE TABLE message (text char(15));
 INSERT INTO message (text) VALUES ('Hello, world!');
 SELECT text FROM message;
 DROP TABLE message;

Bash or sh example:

echo 'Hello, world!'
 printf 'Hello, world!\n'
 printf '%s'
#Hello, world!\n'
Hello world!
Tagged on:                         

Leave a Reply

Your email address will not be published. Required fields are marked *