C++ Output

The cout object in C++ is used to display output on the screen. It is part of the <iostream> library.

Example

#include <iostream>
  using namespace std;
  
  int main() {
      cout << "Welcome to C++ Output!";
      return 0;
  }

Output

Welcome to C++ Output!

Explanation

  • cout sends the output to the console.
  • << is the stream insertion operator.