Hello World
1
2
3
4
5
6
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
1
2
3
4
5
6
#include <iostream>
int main() {
std::cout << "Hello World";
return 0;
}
1
2
3
4
5
6
7
8
9
namespace HelloWorld
{
class Hello {
static void Main(string[] args)
{
System.Console.WriteLine("Hello World");
}
}
}
1
print("Hello World")
1
2
3
4
5
6
7
8
9
10
11
12
/*assembly*/
global _main
extern _printf
section .text
_main:
push message
call _printf
add esp, 4
message:
db 'Hello World', 10, 0
1
2
3
4
5
6
7
8
9
/*package whatever //do not write package name here */
import java.io.*;
class GFG {
public static void main (String[] args) {
System.out.println("Hello World");
}
}
1
console.log("Hello World");
1
echo "Hello World"
1
2
3
4
5
6
fn main() {
// Statements here are executed when the compiled binary is called
// Print text to the console
println!("Hello World!");
}