♦ Hello World ♦
Most of the programmers start programming by printing Hello World
on the screen/console.
A Hello, World!
program is traditionally used to introduce novice programmers to a programming language.
It is also traditionally used in a sanity test to make sure that a computer language is correctly installed, and that the operator understands how to use it.
Hello World
program can be written differently in different langugaes.
C
#include <stdio.h>
int main()
{
printf("Hello, World!"); // printf() displays the string inside quotation
return 0;
}
Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World"); // Prints "Hello, World" in the terminal window.
}
}
PHP
<?php
echo "Hello World!";
?>
Python
print("Hello World")
Ruby
puts "Hello World"