C++ Program

Object:-Write a 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.







You may also like: