Hello, world: Difference between revisions

From Computer History Wiki
Jump to navigationJump to search
Larsbrinkhoff (talk | contribs)
Earlier B version.
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''Hello World''' is the canonical 'shortest example [[program]]' in any given [[programming language]]; a program which simply prints 'hello, world', and then terminates.
'''Hello World''' is the canonical 'shortest example [[program]]' in any given [[programming language]]; a program which simply prints 'hello, world', and then terminates.


The first version appeared in "''A Tutorial Introduction to the Programming Langauge [[B programming language|B]]''":
The first version appeared in "''A Tutorial Introduction to the Programming Language [[B programming language|B]]''":


<pre>
<pre>
Line 26: Line 26:
==External links==
==External links==


* [https://www.bell-labs.com/usr/dmr/www/bintro.html A Tutorial Introduction to the Programming Language B]
* S. C. Johnson, B. W. Kernighan, [https://www.nokia.com/bell-labs/about/dennis-m-ritchie/bintro.html ''The Programming Language B'']
* [https://www.bell-labs.com/usr/dmr/www/ctut.pdf Programming in C - A Tutorial]
** B. W. Kernighan, [https://www.nokia.com/bell-labs/about/dennis-m-ritchie/btut.html ''A Tutorial Introduction to the Programming Language B'']
* Brian W. Kernighan, [https://www.nokia.com/bell-labs/about/dennis-m-ritchie/ctut.pdf ''Programming in C - A Tutorial'']


[[Category: Demo Software]]
[[Category: Demo Software]]

Latest revision as of 11:45, 13 June 2025

Hello World is the canonical 'shortest example program' in any given programming language; a program which simply prints 'hello, world', and then terminates.

The first version appeared in "A Tutorial Introduction to the Programming Language B":

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

a 'hell';
b 'o, w';
c 'orld';

It was popularized with one in the 'C Tutorial' in UNIX V6:

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

External links