C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 12)
12.
cout is a/an __________ .
Discussion:
52 comments Page 4 of 6.
Chandan said:
1 decade ago
Object is the simple variable of a class. So if we will open <iostream> header then we can found the statement.
Extern ostream cout; means cout is the variable of ostream class so. For this reason it is an object.
Extern ostream cout; means cout is the variable of ostream class so. For this reason it is an object.
Ashok@cmc said:
1 decade ago
cout is an object of class ostream that represents the standard output stream. It corresponds to the cstdio stream stdout.
Pratishruti said:
1 decade ago
Why not cout be an operator<<?
Amol bendale said:
1 decade ago
Why cout is not function?
Ponnarasi said:
1 decade ago
cout is a print an output so why its called object.
Naveen said:
1 decade ago
Why printf is function?
NISHAD MAGDUM said:
1 decade ago
cout is object of class ostream and cin is object of class istream.
PAVAN GOLESAR said:
1 decade ago
cout is object of ostream.h header file and cin is object of istream.h header file.
Aarti said:
1 decade ago
If count is an object in iostream.h, then what is the name of class of count's object, because every object must have an class.
Saba said:
1 decade ago
I think cout is a function similar to printf in C programming. It may be an object only when we define it so but primarily it can't be an object.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers