C++ Program Structure

 

Let us look at a simple code that would print the words Hello World.

#include<iostream>

usingnamespacestd;

 

// main() is where program execution begins.

 

int main()

{

cout<<"Hello World";// prints Hello World

return0;

}