C++ Hello World Program

Below is the C++ program to print Hello World.

C++




// C++ program to display "Hello World"
 
// Header file for input output functions
#include <iostream>
using namespace std;
 
// Main() function: where the execution of
// program begins
int main()
{
    // Prints hello world
    cout << "Hello World";
 
    return 0;
}


Output

Hello World

Writing First C++ Program – Hello World Example

C++ is a widely used Object Oriented Programming language and is relatively easy to understand. The “Hello World” program is the first step towards learning any programming language and is also one of the most straightforward programs you will learn.

The Hello World Program in C++ is the basic program that is used to demonstrate how the coding process works. All you have to do is display the message “Hello World” on the console screen.

To write and run C++ programs, you need to set up the local environment on your computer. Refer to the complete article Setting up C++ Development Environment. If you do not want to set up the local environment on your computer, you can also use online IDE to write and run your C++ programs.

Similar Reads

C++ Hello World Program

Below is the C++ program to print Hello World....

Working of Hello World Program in C++

...

Important Points

Let us now understand every line and the terminologies of the above program....