| Language | Compilation Type | Runtime Required | File Extensions | How to Run | Notes |
|---|---|---|---|---|---|
| C | Compiled to native binary | None (after compilation) | .c → .exe/.out | gcc file.c -o program && ./program | Direct machine code execution |
| C++ | Compiled to native binary | None (after compilation) | .cpp/.cc → .exe/.out | g++ file.cpp -o program && ./program | Direct machine code execution |
| Java | Compiled to bytecode | Java Runtime (JRE/JVM) | .java → .class | javac File.java && java File | Platform-independent bytecode |
| C# | Compiled to bytecode (IL) | .NET Runtime | .cs → .exe/.dll | dotnet run or csc file.cs && ./file.exe | Runs on .NET CLR |
| Python | Interpreted (bytecode cached) | Python interpreter | .py | python file.py | Bytecode compiled on-the-fly |
| Rust | Compiled to native binary | None (after compilation) | .rs → .exe | rustc file.rs && ./file or cargo run | Memory-safe compiled language |
| Go | Compiled to native binary | None (after compilation) | .go → .exe | go build file.go && ./file or go run file.go | Fast compilation, single binary |
| JavaScript | Interpreted/JIT compiled | JavaScript engine | .js | node file.js (Node.js) or browser | V8, SpiderMonkey, etc. |
# Compile and run
gcc hello.c -o hello
./hello
# With debugging
gcc -g hello.c -o hello
# With optimization
gcc -O2 hello.c -o hello# Compile and run
g++ hello.cpp -o hello
./hello
# With C++17 standard
g++ -std=c++17 hello.cpp -o hello
# With optimization
g++ -O2 hello.cpp -o hello# Run directly
python hello.py
# Run with specific version
python3 hello.py
# Run module
python -m mymodule
# Interactive mode
python# Compile and run
javac Hello.java
java Hello
# Compile with classpath
javac -cp ./libs:. Hello.java
# Run with classpath
java -cp ./libs:. Hello
# Create and run JAR
jar -cvf myapp.jar *.class
java -jar myapp.jar# .NET Core/5+ (cross-platform)
dotnet new console
dotnet run
dotnet build
dotnet publish
# Traditional .NET Framework (Windows)
csc Hello.cs
Hello.exe
# With specific framework
dotnet build -f net6.0# Compile and run single file
rustc hello.rs
./hello
# Using Cargo (recommended)
cargo new myproject
cargo run
cargo build --release# Run directly
go run hello.go
# Compile to binary
go build hello.go
./hello
# Install and run
go install
myprogram# Node.js (server-side)
node hello.js
# Browser (client-side)
# Load in HTML: <script src="hello.js"></script>
# NPM script
npm run start
# Interactive REPL
node| Language | Execution Speed | Development Speed | Memory Usage | Learning Curve |
|---|---|---|---|---|
| C | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| C++ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ |
| Rust | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ |
| Go | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| Java | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
| C# | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
| JavaScript | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Python | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐⭐ |
# Compilation (produces executable)
gcc hello.c -o hello # C
g++ hello.cpp -o hello # C++
rustc hello.rs # Rust
go build hello.go # Go
# Bytecode compilation (requires runtime)
javac Hello.java # Java (creates .class)
dotnet build # C# (creates IL)
# Direct execution (no separate compilation step)
python hello.py # Python
node hello.js # JavaScript
go run hello.go # Go (compile + run)
cargo run # Rust (using Cargo)
java Hello # Java (run compiled .class)
dotnet run # C# (compile + run)