Hello World Example in Different Languages
2011-05-21
If you are learning C, C++ or even Java, the first code example might be similar, they are all a example named Hello World.
We found a interesting article which collects all Hello World example in different languages.
For example:
In C:
#include <stdio.h>
int main(void)
{
printf("Hello world\n");
return 0;
}
In C++:
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}
In Java:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
Please read more in all other languages from Wikipedia