cpp print code example

Example 1: how to print in c++

#include <iostream>

int main() {
  std::cout << "Hello, World!"; // prints 'Hello, World!' to the output.
  return 0;
}

Example 2: how to output text in c++

std::cout << " Something ";

Example 3: c++ print string

std::cout << "";

Example 4: c++ print

cout << "put text here"

Example 5: how to print in c++

#include <iostream>

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

Example 6: c++ print

cout << "hello world"

Tags:

Java Example