Skip to main content

First Program of your life - "Hello World"...

Hey Guys, Welcome to the first post of my blog. In this section we will be discussing about the first program of our life. Yes, The first program that is printing "Hello World".
        I know whenever you start programming you will write your first program to print "Hello World".
Today, We will discuss printing "Hello World" in 5 Programming Languages.

1. C Language :
        Almost all of the students start C as the first programming language of their life because C is the most basic language to learn. So , the code for first program in C language is -


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



2. C++ :
        The code to print "Hello World" in C++ is -


#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World" << endl;
    return 0;
}



3. Python :
        The Code to print "Hello World" in Python is little easy than C and C++. The Code is -


if __name__ == '__main__':
    print("Hello World\n")



4. PHP :
        PHP is the language mainly used for Web Development as Backend. The code to print "Hello World" is - 


<?php

echo "Hello World";

?>



5. JavaScript :
        JavaScript is the Web Development language which can be used as both Backend and Frontent.
The code for "Hello World" is - 


console.log("Hello World\n");
  


Comments