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.
Shona said:
1 decade ago
cout is an object of class ostream that represents the standard output stream. So the class is ostream not cout.
Sandesh said:
1 decade ago
cout is a object and not a function. cout is an output stream object that refers to the monitor whereas cin refers to the keyboard.Both are defined in the header file <iostream.h>
Amarn kokare said:
1 decade ago
count is a object of a ostream class and we can include a library file in program header, and using this object user can print a data on console.
RAJESH said:
1 decade ago
Its object in ostream.h header file and cin is in istream.h.
Navin said:
1 decade ago
If cout is an object. Can anyone tell me where this object is getting created ?
Sumeet said:
1 decade ago
cout is a stream extraction operator. It is an object of ios class which is predefined in iostream.h header file.
Pooja said:
1 decade ago
cout is predefined in iostream.h.
Can anyone tell me how it is object.
Can anyone tell me how it is object.
Pawan gupta said:
1 decade ago
It belongs to iostream class so member of any class is an object.
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.
Rohit said:
1 decade ago
Can anyone tell why cout is an object?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers