C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.26)

26. 

Which of the following is the correct class of the object cout?

[A]. iostream
[B]. istream
[C]. ostream
[D]. ifstream

Answer: Option C

Explanation:

No answer description available for this question.

Amruta said: (May 11, 2012)  
In iostream, 'i ' is input and 'o' is output. And cin object is used based on 'i' stream and cout as 'o' stream

Babaljeet said: (Oct 8, 2012)  
But iostream includes both input and output operations then why iostream is not correct for cout ?

Shubham said: (Mar 27, 2013)  
Please explain this. I'm also confused between iostream and ostream.

M. Azhar Faroq said: (Apr 11, 2013)  
iostream is correct it is used in both cin and cout?

Mandy said: (Sep 8, 2013)  
I think so iostream is the correct answer because it includes both input AND output i.e. I and O.

Pooja said: (Mar 3, 2014)  
I think <iostream.h> is the library function & we can't use it only ostream for cout or istream for cin .

Saurav Kumar said: (Apr 9, 2014)  
iostream means both cin and cout, istream means only cin and ostream mean only cout so ostream is correct.

Pratibha Agarwal said: (Jun 1, 2014)  
I think iostream is correct because it is common and it consist of both input and output.

Pooja Chougule said: (Oct 9, 2014)  
I think, iostream is concern with both input(cin) and output(cout).

Operations but, question ask specific to cout thus ostream(stream for output) is more correct.

Sachin said: (Oct 17, 2014)  
Why iostream is not correct I don't get it?

Paris said: (Nov 3, 2014)  
iostream is right as it is for both the cin and cout objects.

Arjun Ej said: (Dec 24, 2014)  
cout is for output and cin is for input.

For cout-include the header <istream>.

For cin -include the header <ostream>.

Abc said: (Dec 26, 2014)  
iostream is correct answer because ostream is not any header file in C++.

Venkatesh said: (Mar 18, 2015)  
Cout: Ostream correct or wrong.

Please tell me the answer any one tell me.

Shreyas said: (Apr 6, 2015)  
iostream has 2 parts istream and ostream and cout is found in ostream class but the apparent answers are both ostream and iostream.

Sailee Shazmeen said: (Aug 26, 2015)  
We also confuse about iostream and ostream.

Arpita said: (Oct 28, 2015)  
Here as asked in the question the correct class of cout not for cout an cin.

So the correct one is ostream if it is asked cin and cout both then it is iostream.

Ashok said: (Jan 30, 2016)  
Explain about ifstream?

Kumari said: (Feb 16, 2016)  
ifstream is input file stream class.

Preet said: (Apr 11, 2016)  
Hi, iostream is the correct answer. Briefly, explain ostream and why the answer is ostream?

Nazir Hussain said: (Jan 19, 2017)  
iostream is used for both cin and cout.

Mehak Bhangale said: (Jan 21, 2017)  
The iostream is used for both cin and cout.

Lata said: (Feb 1, 2017)  
The iostream is use for both cin and cout.

Dhoni Fan said: (Mar 15, 2017)  
Iostream can be used for both cin and cout.

Khushbh said: (Sep 8, 2017)  
Ostream is never used.

Jiya said: (Sep 9, 2017)  
The iostream can be used for both cin and cout but asking in question only cout so ans is ostream.

Dhiraj Hargode said: (Jun 5, 2018)  
Actually they ask for object not for header file ao in iostream header file two different objects are there for different purposes ostream for cout and itream for cin purpose.

Sachin Kumar said: (Feb 23, 2019)  
According to me, iostream is correct.

Kicha said: (Oct 13, 2019)  
iostream means both cin and cout, istream means only cin and ostream mean the only cout so ostream is correct.

Jyoti said: (Jan 21, 2021)  
Agree, C is the correct answer.

Esk said: (Sep 6, 2021)  
Cout ostream is the correct form.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.