Article View: comp.lang.c.moderated
Article #1990Re: Canocical hello world
From: Martin Ambuhl
Date: Thu, 15 Feb 1996 15:05
Date: Thu, 15 Feb 1996 15:05
40 lines
1383 bytes
1383 bytes
schweikh@itosun.ito.uni-stuttgart.de (Jens Schweikhardt)
in <4fu7sn$991@solutions.solon.com> asks:
>ObC: What is the canonical first program to write in C? Is it
> "Hello World\n" or
> "Hello, world\n" or
> "hello world\n" or what?
>Please cite authoritative sources or use statistics.
I don't know if there is a more hoary and authoritative source than
K&R1. It is certainly part of the canon, even though it is the "Old
Testament."
Kernighan, Brian W. & Ritchie, Dennis M., _The C Programming Language_,
1978, Prentice Hall, Inc.
p. 5:
The first program is the same for all languages:
Print the words
hello, world
p. 6:
main()
{
printf("hello, world\n");
}
The _second program_ is
p. 7:
main()
{
printf("hello, ");
printf("world");
printf("\n");
}
--
* Martin Ambuhl net: mambuhl@ripco.com
* Chicago, IL (USA)
Technical Details
Message-ID:
<4fvi34$ear@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: mambuhl@ripco.com (Martin Ambuhl) Newsgroups: comp.lang.c.moderated Subject: Re: Canocical hello world Date: 15 Feb 1996 09:05:08 -0600 Organization: Ripco Communications, Inc. Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4fvi34$ear@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com