First C++ Program
Welcome Program
// hello.cpp: displaying Hello World message
#include<iostream.h> //preprocessor directive statement void main () // function declarator
{ //function block open brace
cout<< "Welcome in the world of C++";
} //function block close brace
the output will be
Welcome in the world of C++
Program Description
C++ programs must hold a function known as main (), from that execution of program begins. The function main() is designated as the beginning point of the program execution and the user defines it. It cannot be overloaded and its syntax categories are implementation dependent. Thus, the number of arguments and their data-type is dependent on the compiler. Let's have a close at an extremely simple C++ program that shows Hello World on the screen: -
A header file iostream.h supports streams programming features through involving pre- defined stream objects. The C++'s stream insertion operator, << sends the message "Welcome to C++" to the pre-defined console object, count, that in turn prints on the console.