Hello World: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Pat Palmer
(modifying caption)
imported>Pat Palmer
(adding example in C)
Line 2: Line 2:


A '''Hello World''' program, as first introduced in the book ''The C Programming Language'', is a very short program that typically just prints a word or two of output to a console.  Such a program is often one of the first programs that a [[programmer]] writes when learning a [[programming language]], as it provide's a cursory introduction to the language's [[syntax]] and output.
A '''Hello World''' program, as first introduced in the book ''The C Programming Language'', is a very short program that typically just prints a word or two of output to a console.  Such a program is often one of the first programs that a [[programmer]] writes when learning a [[programming language]], as it provide's a cursory introduction to the language's [[syntax]] and output.
== Example in C ==
<pre>
#include <stdio.h>
int main()
{
    printf("This is my first C program!\n");
    return 0;
}
</pre>


== See also ==
== See also ==

Revision as of 21:19, 20 September 2007

Results of executing a Hello World program in a console (apparently on a Linux or Unix system).

A Hello World program, as first introduced in the book The C Programming Language, is a very short program that typically just prints a word or two of output to a console. Such a program is often one of the first programs that a programmer writes when learning a programming language, as it provide's a cursory introduction to the language's syntax and output.

Example in C

#include <stdio.h>

int main()
{
    printf("This is my first C program!\n");
    return 0;
}

See also

99 Bottles of Beer

External links

The Hello World Collection in more than 300 programming languages