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:

Article Tags: , , , ,