Basic understanding of C++ hello world program

Table of contents

No heading

No headings in the article.

The basic understanding to the world of c++ programming language is quite simple and easier to learn. The origin of understanding of c++ language starts with its hello world program and its explaination is quite simple and fruitful to understand

The basic hello world program is as follows:

#include using namespace std;

int main() { cout << "Hello World!"; return 0; }

#include<iostream>//anything written after "#" in c++ program is an directive which is processed by preprocessor , "iostream" is a header file library in c++ that lets us work with input and output objects,header files adds functionality to c++ program.

using namespace std; //this simply says about the namespace which is used into our code for which we can use names for objects and variables from standard library.

int main()//This is the main function of c++ programming language in which anything we write code will be executed,whichever function to be executed should be called in main function only.

{

cout << "Hello World!";//cout is an object to print/output the statement in c++ language. Note that every c++ statement ends with ";"(colon) only.

return 0;//It simply says about that the program is about to end

}//Dont forget to add the closing curly bracket to actually end the main function.