Article View: comp.lang.c.moderated
Article #2022Re: Canocical hello world
From: Jens Schweikhardt
Date: Fri, 16 Feb 1996 15:23
Date: Fri, 16 Feb 1996 15:23
32 lines
1297 bytes
1297 bytes
In article <4fvi34$ear@solutions.solon.com>,
Martin Ambuhl <mambuhl@ripco.com> wrote:
+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?
+
+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 edition (K&R2) adds
#include <stdio.h>
at the very beginning, probably to escape undefined behaviour...
Bye, Jens
--
SIGSIG -- signature too long (core dumped)
Technical Details
Message-ID:
<4g27hj$q6i@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4fvi34$ear@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: schweikh@itosun.ito.uni-stuttgart.de (Jens Schweikhardt) Newsgroups: comp.lang.c.moderated Subject: Re: Canocical hello world Date: 16 Feb 1996 09:23:31 -0600 Organization: Comp.Center (RUS), U of Stuttgart, FRG Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4g27hj$q6i@solutions.solon.com> References: <4fvi34$ear@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com