--- title: "HELLO, WORLD" type: "article" slug: "hello-world-2" url: "http://localhost/article/hello-world-2/" markdown_url: "http://localhost/article/hello-world-2.md" published_at: "2025-12-18T14:43:09+00:00" modified_at: "2026-06-21T23:35:57+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "In a number of recent postings to alt.folklore.computers, the answer to the question \"What's the shortest 'Hello, World' program for a specific language? For those that don't know, 'Hello, World' is the first program used in K&R's book on C and is synonomus with the simplest program to write as a beginner. The whole scope…" category: - name: "QL Hacker's Journal" slug: "ql-hackers-journal" taxonomy: "category" url: "http://localhost/category/periodicals/ql-hackers-journal/" post_tag: - name: "C (programming language)" slug: "c-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/c-programming-language/" - name: "Full Text" slug: "fulltext" taxonomy: "post_tag" url: "http://localhost/tag/fulltext/" - name: "QL" slug: "ql" taxonomy: "post_tag" url: "http://localhost/tag/ql/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Tim Swenson" slug: "tim-swenson" taxonomy: "indiv" url: "http://localhost/indiv/tim-swenson/" publication_r: id: 33686 title: "QL Hacker’s Journal" type: "periodical" url: "http://localhost/periodical/ql-hackers-journal/" authors_r: - name: "Tim Swenson" slug: "tim-swenson" taxonomy: "indiv" url: "http://localhost/indiv/tim-swenson/" issue: "18" issues_articles: - id: 61554 title: "QL Hacker’s Journal 18" type: "issue" url: "http://localhost/issue/ql-hackers-journal-18/" pubdate: "August 1994" archive_link: true --- # HELLO, WORLD In a number of recent postings to alt.folklore.computers, the answer to the question “What’s the shortest ‘Hello, World’ program for a specific language? For those that don’t know, ‘Hello, World’ is the first program used in K&R’s book on C and is synonomus with the simplest program to write as a beginner. The whole scope of the program is to print the string ‘Hello, World’. Here is a summary of the results of the postings: ``` BASIC: ------ 10 PRINT "Hello, World" FORTRAN IV: ----------- WRITE(6,100) 100 FORMAT(13H Hello World!) ST OP EN *D COBOL: ------ IDENTIFICATION DIVISION. PROGRAM-ID. WORLD. ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. BOO. DISPLAY "Hello, world!" UPON CONSOLE. STOP RUN. ADA: ---- With STANDARD_IO; Use STANDARD_IO; Procedure HELLO_WORLD is begin Put("Hello world!"); end HELLO_WORLD; C: -- #include main() { printf('Hello, World!"); } perl: ----- #/usr/local/bin/perl print "Hello, World!¥n"; Postscript: ----------- 100 100 moveto /Times-Roman findfont 24 scalefont (Hello, World!) show showpage FORTH: ------ ."Hello, World!" Lisp: ----- (print "Hello, World!") Smalltalk: ---------- 'Hello, World!' PrintN1 ! PILOT: ------ 10 T:Hello, World! REXX: ----- SAY "Hello, World!" Modula-2: --------- MODULE HelloWorld; IMPORT InOut; BEGIN WriteString ("Hello, World!"); WriteLn; END HelloWorld. Here is an interesting one in C. I have not checked this one to see if it runs under C68. #define _ ィint) putchar main() { int c = 0110 ;_(c);c+=29;_(c);c+=7 ;_(c);_(c);c+=3;_(c) ;c=0x20;_(c);c=0127 ;_(c);c+=24;_(c); c+=0x3;_(c);c-= 6;_(c);c-=010; _(c);c=0x21; _(c);_(10) ;c+=66;} Nokolisp: (which had only symbols - no character strings) --------- (compress (append (explode 'Hello) (cons 32 (explode 'world.)))) ```