Std:cout














































Std:cout



std::cout is an object of ostream class that represents the standard output stream oriented to narrow characters (of type char). It corresponds to the C stream stdout. The standard output stream is the default destination of characters determined by the environment. This destination may be shared with more standard objects (such as cerr or clog).
As an object of class ostream, characters can be written to it either as formatted data using the insertion operator (operator<<) or as unformatted data, using member functions such as write. The object is declared in the header <iostream> with external linkage and static duration: The scope lasts the entire duration of the program.

For ex : 
#include<iostream>
int main() {
   std::cout << "Hello";
   return 0;
}

Output of the above code snippet : 
 Hello



More Articles of More Rakesh:

Name Views Likes
std::dec 456 1
std::clog 723 1
std::scanf 539 0
std::fixed 3369 0
std::freopen 532 0
std::fclose 287 1
std::cerr and std::wcerr 764 0
Std:cout 400 1
std::fprintf() 580 0
std::setw and std::setfill 1148 0
std::defaultfloat 602 0
std::endl 245 0
std::cin 293 1
std::fread() 645 0
std::fopen() 615 1

Comments