Hello World

From JumbaWiki

Jump to: navigation, search

A "hello world" program is a software program that prints out "Hello, world!" on a display device (usually a computer screen). It is used in many introductory tutorials for teaching a programming language and many students use it as their first programming experience in a language.

While small test programs existed since the development of programmable computers, the tradition of using the phrase "Hello world!" as the test message was influenced by an example program in the book The C Programming Language, by Brian Kernighan and Dennis Ritchie, published in 1978. The example program from that book prints "hello, world" (i.e., no capital letters, no exclamation sign; those entered the tradition later). The book had inherited the program from a 1974 Bell Labs internal memorandum by Kernighan —Programming in C: A Tutorial— which shows the first known version of the program:

 main() {
    printf("hello, world");
 }

However, the first known instance of the usage of the words "hello" and "world" together in computer literature occurred in A Tutorial Introduction to the Language B, by Brian Kernighan, 1972 [1], with the following code:

 main( ) {
   extrn a, b, c;
   putchar(a); putchar(b); putchar(c); putchar('!*n');
 }
 a 'hell';
 b 'o, w';
 c 'orld';


Contents

Other Languages

You can create this program in many other languages, here are some expamples:

ASP

<%
   Response.write "Hello World!"
%>

HTML

<body>
Hello World!
</body>

Perl

 #!/usr/bin/perl
 print "Hello, world!\n";

PHP

 <?php echo "Hello World!" ?>

JavaScript

 <script language="Javascript">alert("Hello World!");</script>
 
 <script language="Javascript">document.write("Hello World!");</script>

See also

External links

Personal tools
Australian Photography | Unique Views of Reality | Daedalus