C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 12)
12.
cout is a/an __________ .
operator
function
object
macro
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
52 comments Page 1 of 6.

Sagar nale said:   3 years ago
Yes, cout is an object of the class ostream, and ostream is a class not cout thus cout is an object of the class ostream.
(4)

Pratik said:   7 years ago
cout is an object of STDOUT class which is already in iostream header file.
(2)

Salman said:   8 years ago
Cout: is an object of type ostream.

Cin: is an object of type istream.
(2)

Rahul said:   8 years ago
Std::cout and std::cin are global objects of classes std::ostream and std::istream, which they've overloaded operator << and >>. You should read about operator overloading. The Cout is the object of type ostream. Cin is the object of type istream.
(2)

Ved prakash said:   5 years ago
cout is an object of class ostream that represents the standard output stream. So the class is ostream and object is cout.
(1)

Java Mari said:   8 years ago
We have already known operator means it will be performed some kind of operations between two are more operands. likewise here ,,"cout " perform an input operation by using the symbol ">>" but the same time it is an object.

How it is possible?

Because cout is a object for (derived class or sub class) ostream .and it's main class is "iostream.h" so the answer is (c) OBJECT.
(1)

Meester anony said:   1 decade ago
Cout is when someone tries saying caught but doesn't know how to pronounce it properly.

ALEX said:   1 decade ago
"cout" is an object of "ostream_withassign" class.
And
"cin" is an object of "istream_withassign" class.

Rohini said:   1 decade ago
cout is an object because it is an object of ostream and we use the header file <iostream> here. It allows both input and output operations.

Kiran said:   1 decade ago
cout is an object of ostream & cin is a object of istream.


Post your comments here:

Your comments will be displayed after verification.