Skip to main content

Hello World program in different different languages

C:

#include<stdio.h>

int main(){

    printf("Hello World\n");

    return 0;

}

 

C++:

#include<iostream>

using namespace std;

int main(){

    cout<<"Hello World"<<endl;

    return 0;

}

 

Python:

print("Hello World\n")

 

Node JS:

console.log("Hello World");

 

Java Script:

document.write("Hello World");

 

Objective C:

#import <Foundation/Foundation.h>

int main(int argc, const char* argv[]){

    @autoreleasepool{

        NSLog(@"Hello World");

    }

     0;

}


JAVA:

class HelloWorld{

    public static void main(String[] args){

        System.out.println("Hello World");

    }

}


BASH:

echo "Hello World"



Comments

Popular Posts

Programing Langauges HLL vs LLL

High Level Languages:      High level languages are abbreviated as HLL, these languages are too much similar to human language. These are more programmer friendly languages easy to code, debug and maintain. Actually they don't interact with the hardware , rather they focuses more on the complex arithmetic operations, optimal program efficiency and easiness in coding.      High level language requires a compilers or an interpreters to translate source code written in high level language to machine language. We can compile the source code written in HLL to multiple languages. Thus they are machine independent language. Advantages of HLL: It provides higher level of abstraction from machine languages. It is machine independent languages. Less error prone, easy to find debug errors. They provides the better programming productivity. Disadvantages of HLL:  Its take additional time to translate its code to machine code. HLL programmer are much slower than...