Hello World C++ Example Program

Major Parts:

  • Header Files Declaration and Namespace Declaration
  • Main Function - int main()
  • Other Functions/Classes(Optional)

Syntax

syntax

Program

/*  Example Program For Hello World In C++
    little drops @ thiyagaraaj.com

    Coded By: THIYAGARAAJ MP             */

// Header Files
#include<iostream>
#include<conio.h>

//Standard namespace declaration
using namespace std;

//Main Function
int main()
{
     //Standard Ouput Statement
     cout<<"My First C++ Program";
     // Wait For Output Screen
     getch();
     //Main Function return Statement
     return 0;
}

Sample Output

My First C++ Program