Articles

C++ program to print hello world | c++ programs

C++ program to print hello world | c++ programs

In this chapter of C++ program tutorial, our task is to :

  • write a c++ program to print "HELLO WORLD"   

C++ program for printing "HELLO WORLD"

Given below is a C++ program which prints "HELLO WORLD" on the console

 

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

OUTPUT :

HELLO WORLD

EXPLANATION:

In the above code:

  • The execution starts from the main function (here int main()).
  • The "cout" in C++ makes the output of whatever is written in the double quotes as it is. 

You can see the above code execution and output in codeblocks IDE:

C++ program to print hello world

 

 


CPP Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Sayantan Bose
A coder who learns from mistakes
Page Views :    Published Date : Jul 24,2020  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!