Self replicating Hello World program Create a self-replicating Hello World Program. (The program has the ability to use the compiler, if you want).

For example:

void main()
{
    printf("Hello, World!");
    DuplicateFile("main.exe", "main2.exe");
}




Alternate challenge: A "quine" Hello World Program.
Bash - 43
echo $(echo Hello, World! &gt;&amp;2)$BASH_COMMAND

This prints &quot;Hello, World!&quot; on standard error, and itself on standard output.
For fun:
$ ./replicate-hello.bash
Hello, World!
echo $(echo Hello, World! &gt;&amp;2)$BASH_COMMAND
$ ./replicate-hello.bash | bash
Hello, World!
Hello, World!
echo $(echo Hello, World! &gt;&amp;2)$BASH_COMMAND
$ ./replicate-hello.bash | bash | bash
Hello, World!
Hello, World!
Hello, World!
echo $(echo Hello, World! &gt;&amp;2)$BASH_COMMAND
$ bash &lt;&lt;&lt; $(echo ./replicate-hello.bash; \
             for ((i=0;i&lt;100;i++)) ; do echo &quot;| bash&quot;; done)
Hello, World!
Hello, World!
Hello, World!
Hello, World!
... snip ...
Hello, World!
Hello, World!
Hello, World!
echo $(echo Hello, World! &gt;&amp;2)$BASH_COMMAND