Sunday, November 05, 2006

C, Java & Visual Basic's 'Hello World!'

ANSI C: http://en.wikipedia.org/wiki/ANSI_C

#include ; /* Standard Input Output Header */

int main(int argc, char *argv){ //Main Method
char c = 'Hello World!"; /* Define 'c' As Character & Assign String 'Hello World!' */
printf('%s\n', c); /* Print Line Containing String 'c'(%s), '\n' Returns Next Line */
return(0); /* Returns Program Exit */
} /* HelloWorld.c */

Sun Java 2 Standard: http://en.wikipedia.org/wiki/Sun_java

public class HelloWorld{ // Class (Program) Hello World
public static void main(String []args){ //Main Method
System.out.println("Hello World!"); // Print Line Containg String "Hello World!"
}
} /* HelloWorld.java */

Microsoft Visual Basic 2005: http://en.wikipedia.org/wiki/Visual_Basic_.NET

MsgBox("Hello World!") 'Pop Up Message Box Showing String "Hello World!"
*Other Structural Syntax Statements Are Automatically Generated

No comments: