Check out example codes for "c++ output". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>

int main(){
  std::cout << "Hello World!" << std::endl; // prints "Hello World"
}

Code Example 2

cout << "Phrase << endl;

Code Example 3

std::cout << "Hello World!" << std::endl; //Or you can do
std::cout << "Hello World!" <<; //Only in some scenarios

Code Example 4

std::cout << " Something ";

Code Example 5

// cin with strings
#include <iostream>
#include <string>
using namespace std;

int main ()
{
  string mystr;
  cout << "What's your name? ";
  getline (cin, mystr);
  cout << "Hello " << mystr << ".\n";
  cout << "What is your favorite team? ";
  getline (cin, mystr);
  cout << "I like " << mystr << " too!\n";
  return 0;
}

Code Example 6

#include <iostream>

int main() {
  std::cout << "Hello World!"; //cout keyword prints "Hello World!"
  return 0;
}

Learn ReactJs, React Native from akashmittal.com