Saturday, 21 October 2017

Hello Program in C++


About C++ Programming:-
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs.
C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
This tutorial adopts a simple and practical approach to describe the concepts of C++.
Before you start practicing with various types of examples given in this tutorial,
We are making an assumption that you are already aware of the basics of computer program and computer programming language.

Tools For Use:-
There are many tools used to compile the C++ Program. We personally used Visual Studio 2012 to compile this C++ program.

Source Code:-
//Header File.
#include <iostream>

//importing namespace.
using namespace std;

//Main Function which will be executed at run-time.
void main()
{
cout <<"Hello World";
/*cout<< command prints text on the display screen. It is available in ‘std’ namespace.
*/
}

Output:-
Hello World

Things to know:-
We use comments in programming to disable execution of specific code. There are 2 types of comments.
1.Single line (denoted by //)
2.Multiple line (denoted by /* */)
We have used them in the program above.


Thank You!

1 comment: