c++ program to print hello world


#include <iostream>
using namespace std;

int main() 
{
  cout << "Hello, World!";
  return 0;
}

Output

Hello, World! 

Explanation

  • Every C++ program starts from the main() function.
  • The cout is the standard output stream which prints the "Hello, World!" string on the monitor.
  • The return 0; is the Exit status" of the program.