Let's analyze the program that displays the phrase "Hello, world!"
#include <iostream>
using namespace std;
main()
{
cout<<"Hello, World!";
}
We will analyze in order:
#include<iostream> - (
Input Output stream ).
using namespace std;- this line says that the namespace
std will be used, which defines the entire standard C ++ language library.
Here, the namespace is the scope of program objects, including variables. The
std area describes standard input and output streams with the names
cin and
cout.
cout<<"Hello, World!"; - cout - it is the name of the output stream, it is the sequence of characters displayed on the screen (the sequence of characters that we output is written in quotation marks after two triangular brackets
<<
)
.