Hello World in C++

The following program print “Hello world!” in C++. Here iostream file helps for input and output. It allows us to use ‘cin’ and ‘cout’. ‘cout’ prints output on the screen. Execution of a C++ program starts from int main(). 

#include<iostream>
using namespace std;

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

}

Output:

Hello world!
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments