We can display the output using C++ in using the cout standard output stream of library iostream. The library iostream support the basics input and output operations. We can take input and also display and some data or output using iostream library.
This library is mostly default included into the compiler the environment or platform we use e.g Microsoft Visual C++ .
#include <iostream>
First we will display the directly then in second below program we will store some strings into a variable and then we will display it using the cout standard output stream.
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
string mystring="Hello World";
cout<<mystring;
return 0;
}