DIGIT-ARC read-only archive · snapshot: July 23, 2026

The Official Hello world thread!.....

15 posts · originally from https://geek.digit.in/community/threads/the-official-hello-world-thread.115182/

vamsi360
vamsi360 Original post #1
May 9, 2009 at 9:41 PM
C:
Code:
 #include int main() {     printf("Hello world!"); }
Liverpool_fan
May 9, 2009 at 9:47 PM
Python:

Code:
print "Hello World"

Or More structural:

Code:
def main():
	print "Hello World"
	
if __name__=='__main__':
	main()

Ruby:
Code:
puts "Hello World"
Disc_Junkie
May 12, 2009 at 4:03 PM
JAVA

Code:
[FONT=&quot][B]
[/B][/FONT]class HelloWorld
{
           public static void main()
           {
           System.out.println("Hello World");
           }
}

C++



Code:
#include<iostream.h>
#include<conio.h>
void main()
        {
         cout<<"Hello World";
         getch();
        }
nvidia
nvidia #4
May 12, 2009 at 7:54 PM
C#:
Code:
namespace Hello_World
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.Write("Hello World");
        }
    }
}
Liverpool_fan
May 12, 2009 at 8:04 PM
[



C++



Code:
#include<iostream.h>
#include<conio.h>
void main()
        {
         cout<<"Hello World";
         getch();
        }

Er..um..this is not exactly according to standards. This is actually Turbo C++ taught in schools and colleges in India.
Anyway it should be

Code:
#include<iostream>

int main()
{
       std::cout<<"Hello World";
       return 0;
}
Disk_Junkie said:
Code:
[FONT=&quot][B]
[/B][/FONT]class HelloWorld
{
           public static void main()
           {
           System.out.println("Hello World");
           }
}
Shouldn't there be String[] arguments in main()? (I know a crap about java but I think Java requires arguments for main as such)
Disc_Junkie
May 12, 2009 at 9:57 PM
Er..um..this is not exactly according to standards. This is actually Turbo C++ taught in schools and colleges in India.
Anyway it should be

Code:
#include<iostream>

int main()
{
       std::cout<<"Hello World";
       return 0;
}
You used the int return type and I used void. Yup I coded it according to Turbo C++. But thanks for your example...:)

Shouldn't there be String[] arguments in main()? (I know a crap about java but I think Java requires arguments for main as such)

It isn't necessary as such(as the program will still compile) but yup it's worth mentioning...
Liverpool_fan
May 12, 2009 at 10:39 PM
You used the int return type and I used void. Yup I coded it according to Turbo C++. But thanks for your example...:)
It's Actually it's for a reason:
*www.gidnetwork.com/b-66.html
vamsi360
vamsi360 #10
Jun 2, 2009 at 7:41 PM
in C#:

Code:
using System;
class HelloWorld  {
     static void Main()  {
           Console.WriteLine("Hello, World!");
     }
}

in PHP:

Code:
<?php
echo "Hello, World!";
?>
Liverpool_fan
Jun 4, 2009 at 4:52 PM
Ruby
Code:
#!/usr/bin/env ruby
puts "Hello World"
D
Code:
import std.stdio;

int main(char[][] args)
{
    writefln("Hello World");
    return 0;
}
hullap
hullap #12
Jun 4, 2009 at 6:28 PM
LOLCODE
Code:
HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
:lol:
skeletor
skeletor #13
Jun 4, 2009 at 8:02 PM
niaaaaaa :D
Crazykiller
Jun 4, 2009 at 9:47 PM
^^
Niaaaaaaa???????

Surely you don't mean this
damngoodman999
Jun 4, 2009 at 10:04 PM
C:

# define

void main ()

{

printf ("ram says hello to all"\n);

}