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

Some useful shortcuts of Libre Office Writer

Ctrl+A   Select All Ctrl+J    Justify Ctrl+D Double Underline Ctrl+E Centered Ctrl+F Find and Replace Ctrl+Shift+P Superscript Ctrl+L Align Left Ctrl+R Align Right Ctrl+Shift+B Subscript Ctrl+Y Redo last action Ctrl+0 (zero) Apply Default   paragraph style Ctrl+1 Apply Heading 1 paragraph style Ctrl+2 Apply Heading 2 paragraph style Ctrl+3 Apply Heading 3 paragraph style Ctrl+5 1.5 Line Spacing Ctrl+ Plus Key(+) Calculates the selected text and copies the result to the clipboard. Ctrl+Hyphen(-) Custom hyphens; hyphenation set by you. Ctrl+Shift+minus sign (-) Non-breaking dash (is not used for hyphenation) Ctrl+multiplication sign * (only on number pad) Run macro field Ctrl+Shift+Space Non-breaking spaces. Non-breaking spaces are not used for hyphenation and are not expanded if the text is justified. Shift+Enter Line break without paragraph change Ctrl+Enter Manual page break Ctrl+Shift+Enter Column break in multicolumnar texts Alt+Enter I...