Hello, World!

Since the first book on the C language [1], written several decades ago, a simple example program has been used to test the compiler/linker/execution process. The example contains a single statement to display the words Hello, World! on the computer screen.

hello.c


1: #include <stdio.h>
2: 
3: int main()
4: {
5:         printf("Hello, world\n");
6:         return 0;
7: }


Results

The console (or command) window below shows the compilation and execution of this example program. This example uses the Microsoft C/C++ Compiler.

Reference

[1] Brian Kernighan and Dennis Ritchie, C Programming Language, Second Edition, Prentice-Hall, 1988. ISBN 0-13-110370-9.


Maintained by John Loomis, updated Mon Jul 28 19:54:54 2008