C++ Program To Print Hello World!

What we are going to see through this article is we will see in detail C++ Program To Print Hello World!. The “Hello World” program is the first but most important step in learning any programming language, and it is the simplest program you can learn in every programming language. All you have to do is display the message “Hello World” on the release screen.

C++ Program To Print Hello World!

C++ Program to Print Hello World!

// Simple 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;
}

The cout the object belongs to the iostream file and the purpose of this object is to display the content between double quotes as it is on the screen. This object can also display the value of variables on the screen.

Read Also: Generate Random Password In C++

Output

The output screen just displays as “Hello World”. You don’t want to do anything on the output screen. The output screen just displays your message.

Hello World

Final Words

What we learned through this article is C++ Program To Print Hello World!. Also if you have any doubts please leave a comment via the comment box. And we ask that you benefit everyone who shared this article with your friends.

Leave a Comment