C++ Hello World

In this example, we are giving a program to display "Hello World!".


Displaying "Hello, World!":

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. // cout displays the string inside quotation
  6. cout<<"Hello, World!";
  7. return 0;
  8. }

Output:

Hello, World!