Your First C++ program

This is your first C plus plus (C++) program which let you know how you can write your first C++ program. This is a simple C++ program which prints the “Hello World!”. The “Hello World!” program is the first program for any programming language.

By executing this program, you can check whether everything is working fine or not in your system. Copy and paste below “Hello World!” C program on your machine.

Your First C++ program

Here is the explanation of the above C++ program:

  1. #include : It will include the header file of C++ library into your application.
  2. using namespace std: It is a standard C++ input/output library file.
  3. int main() { }: It is main function of C++, this program will start executing first from this function.
  4. cout << “Hello World!”;: This will print the "Hello World!"

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.


Article Tags: , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.