Liwaiwai Liwaiwai
  • /
  • Artificial Intelligence
  • Machine Learning
  • Robotics
  • Engineering
    • Architecture
    • Design
    • Software
    • Hybrid Cloud
    • Data
  • Learning
  • About
  • /
  • Artificial Intelligence
  • Machine Learning
  • Robotics
  • Engineering
    • Architecture
    • Design
    • Software
    • Hybrid Cloud
    • Data
  • Learning
  • About
Liwaiwai Liwaiwai
  • /
  • Artificial Intelligence
  • Machine Learning
  • Robotics
  • Engineering
    • Architecture
    • Design
    • Software
    • Hybrid Cloud
    • Data
  • Learning
  • About
  • Software Engineering

How To Say “Hello World” In 23 Programming Languages

  • February 28, 2023
  • liwaiwai.com

In the world of programming, “Hello World” is often the first program developers write when they start learning a new language. This simple program outputs the phrase “Hello, World!” to the screen, and while it may seem like a trivial exercise, it serves as a great starting point for anyone learning a new programming language. But with so many programming languages out there, have you ever wondered what “Hello World” looks like in all of them?

In this article, we’ll explore the top 23 programming languages and take a look at how to write a “Hello World” program in each one. Whether you’re an experienced developer or just starting out, this article will provide an interesting glimpse into the similarities and differences between some of the most popular programming languages used today.


Partner with liwaiwai.com
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

01. Python

print('Hello, world!')

02. C

#include <stdio.h>
int main() {
  printf("Hello, World!");
  return 0;
}

03 C++

#include <iostream>
int main() {
  std::cout << "Hello World!";
  return 0;
}

04. Java

class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello, World!"); 
  }
}

05. C#

namespace HelloWorld
{
  class Hello {         
    static void Main(string[] args)
    {
      System.Console.WriteLine("Hello World!");
    }
  }
}

06. Visual Basic

Imports System

Module Module1
  Sub Main()
    Console.WriteLine("Hello World!")
    Console.WriteLine("Press Enter Key to Exit.")
    Console.ReadLine()
  End Sub
End Module

07. JavaScript

console.log('Hello World');

08. SQL

CREATE TABLE helloworld (phrase TEXT);
INSERT INTO helloworld VALUES ("Hello, World!");
SELECT * FROM helloworld;

09. Assembly Language

global    _start
 
          section   .text
_start:   mov       rax, 1                  ; system call for write
          mov       rdi, 1                  ; file handle 1 is stdout
          mov       rsi, message            ; address of string to output
          mov       rdx, 13                 ; number of bytes
          syscall                           ; invoke operating system to do the write
          mov       rax, 60                 ; system call for exit
          xor       rdi, rdi                ; exit code 0
          syscall                           ; invoke operating system to exit
 
          section   .data
message:  db        "Hello, World", 10      ; note the newline at the end

10. PHP

<!DOCTYPE html>
<html>
<body>
 
<h1>My first PHP page</h1>
 
<?php
echo "Hello World!";
?>
 
</body>
</html>

11. Swift

print("Hello, world!")

12. Go

package main
 
import "fmt"
 
func main() {
    fmt.Println("hello world")
}

13. R

print("Hello World!")

14. Classic Visual Basic

Imports System
 
Module Module1
  Sub Main()
    Console.WriteLine("Hello World!")
    Console.WriteLine("Press Enter Key to Exit.")
    Console.ReadLine()
  End Sub
End Module

15. MATLAB

function y = hello_world 
%#codegen
y = 'Hello World!';

16. Ruby

puts "Hello World"

17. Rust

fn main() {
  println!("Hello World!");
}

18. Scala

@main def hello() = println("Hello, World!")

19. Perl

#!/usr/bin/perl
use warnings;
print("Hello, World!\n");

20. Scratch

say Hello World!

21. (Visual) FoxPro

Messagebox("Hello World!",64)
? "Hello World"

22. SAS

proc ds2 libs=work;
data _null_;
 
  /* init() - system method */
  method init();
    declare varchar(16) message; /* method (local) scope */
    message = 'Hello World!';
    put message;
  end;
enddata;
run;
quit;

23. Objective-C

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSLog (@"Hello, World!");
    [pool drain];
    return YES;
 
}

Source: Cyberpogo

Read More  The Prime Suspect. Unraveling The Regex Riddle.

For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

liwaiwai.com

Related Topics
  • Hello World
  • Programming Languages
You May Also Like
View Post
  • Artificial Intelligence
  • Data
  • Platforms
  • Software Engineering
  • Technology

Combining AI With A Trusted Data Approach On IBM Power To Fuel Business Outcomes

  • September 11, 2023
View Post
  • Artificial Intelligence
  • Software Engineering
  • Technology

Introducing Code Llama, A State-Of-The-Art Large Language Model For Coding

  • August 25, 2023
Redis logo
View Post
  • Data
  • Platforms
  • Software Engineering

Redis 7.2 Sets New Standard For Developers To Harness The Power Of Real-Time Data

  • August 15, 2023
View Post
  • Machine Learning
  • Software Engineering

End-to-End Secure Evaluation of Code Generation Models

  • August 12, 2023
Python | Code
View Post
  • Engineering
  • Software Engineering

LPython: Novel, Fast, Retargetable Python Compiler

  • July 31, 2023
Developers | Software | Program | Engineering
View Post
  • Software Engineering
  • Technology
  • Tools

Top IDEs And Compilers For C++.

  • July 4, 2023
C++
View Post
  • Engineering
  • Featured
  • Software Engineering

Exploring The Future With The Past. The Pros And Cons of C++ In An Evolving Programming Landscape.

  • July 4, 2023
Software powered by data | Non-realistic view particle
View Post
  • Engineering
  • Software Engineering

Unleashing The Power Of Code. Paving The Sustainable Path In Software Engineering.

  • July 4, 2023
A Field Guide To A.I.
Navigate the complexities of Artificial Intelligence and unlock new perspectives in this must-have guide.
Now available in print and ebook.

charity-water



Stay Connected!
LATEST
  • OpenAI 1
    How We Interact With Information: The New Era Of Search
    • September 28, 2023
  • 2
    Bring AI To Looker With The Machine Learning Accelerator
    • September 28, 2023
  • 3
    3 Questions: A New PhD Program From The Center For Computational Science And Engineering
    • September 28, 2023
  • 4
    Microsoft And Mercy Collaborate To Empower Clinicians To Transform Patient Care With Generative AI
    • September 27, 2023
  • 5
    NASA’s Mars Rovers Could Inspire A More Ethical Future For AI
    • September 26, 2023
  • 6
    Oracle CloudWorld 2023: 6 Key Takeaways From The Big Annual Event
    • September 25, 2023
  • 7
    3 Ways AI Can Help Communities Adapt To Climate Change In Africa
    • September 25, 2023
  • Robotic Hand | Lights 8
    Nvidia H100 Tensor Core GPUs Come To Oracle Cloud
    • September 24, 2023
  • 9
    AI-Driven Tool Makes It Easy To Personalize 3D-Printable Models
    • September 22, 2023
  • 10
    Huawei: Advancing a Flourishing AI Ecosystem Together
    • September 22, 2023

about
About
Hello World!

We are liwaiwai.com. Created by programmers for programmers.

Our site aims to provide materials, guides, programming how-tos, and resources relating to artificial intelligence, machine learning and the likes.

We would like to hear from you.

If you have any questions, enquiries or would like to sponsor content, kindly reach out to us at:

[email protected]

Live long & prosper!
Most Popular
  • Coffee | Laptop | Notebook | Work 1
    First HP Work Relationship Index Shows Majority of People Worldwide Have an Unhealthy Relationship with Work
    • September 20, 2023
  • 2
    Huawei Connect 2023: Accelerating Intelligence For Shared Success
    • September 20, 2023
  • 3
    Applying Generative AI To Product Design With BigQuery DataFrames
    • September 21, 2023
  • 4
    Combining AI With A Trusted Data Approach On IBM Power To Fuel Business Outcomes
    • September 21, 2023
  • Microsoft and Adobe 5
    Microsoft And Adobe Partner To Deliver Cost Savings And Business Benefits
    • September 21, 2023
  • /
  • Artificial Intelligence
  • Explore
  • About
  • Contact Us

Input your search keywords and press Enter.