Hello world program: Difference between revisions
From Coderwiki
More actions
new |
(No difference)
|
Latest revision as of 11:08, 9 August 2025
A 'Hello World' program is generally the simplest computer program possible in a programming language.
Uses of a hello world program
edit edit source- Learning the basic syntax of a new programming language: it's often the easiest thing you can program
- Testing that a build tool is set up correctly
Example: hello world in Python
edit edit sourceprint("Hello World")
Example: hello world in C
edit edit source#include <stdio.h>
int main(int argc, char* argv[]) {
printf("Hello World");
return 0;
}
Example: hello world in Java
edit edit source// File name: MyProgram.java
public class MyProgram {
public static void main(String[] args) {
System.out.println("Hello World");
}
}