Penguin
Note: You are viewing an old revision of this page. View the current version.

HelloWorld

This is the default introductory program to a new programming or scripting language. The main purpose and goal of the program is to display the text string "Hello World\n" to the standard output stream (stdout(3)).

Some examples in different ProgrammingLanguages?:

BASIC

PRINT "Hello World\n"

C

  1. include <stdio.h>

int main(int argc, char **argv) {

printf("Hello World\n"); return 0;

}

C++

  1. include <iostream>

void main(){

cout << "Hello World" << endl;

}

Linux x86 AssemblyLanguage

.data .align 4

message
.string "Hello World\n"

message_len = . - message

.text .align 4 .globl _start

_start
movl $0x4, %eax movl $0x1, %ebx movl $message, %ecx movl $message_len, %edx int $0x80 movl $0x1, %eax xorl %ebx, %ebx int $0x80

Well yeah, I could go on and on for different programming languages but there would be too many to list here1?.


Footnotes

1? In fact there are hundreds of programming languages.


Aborted effort.
Close all that you have worked on.
You ask far too much.