C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 26)
26.
Which of the following is the correct class of the object cout?
Discussion:
35 comments Page 3 of 4.
Shreyas said:
1 decade ago
iostream has 2 parts istream and ostream and cout is found in ostream class but the apparent answers are both ostream and iostream.
Venkatesh said:
1 decade ago
Cout: Ostream correct or wrong.
Please tell me the answer any one tell me.
Please tell me the answer any one tell me.
Abc said:
1 decade ago
iostream is correct answer because ostream is not any header file in C++.
Arjun EJ said:
1 decade ago
cout is for output and cin is for input.
For cout-include the header <istream>.
For cin -include the header <ostream>.
For cout-include the header <istream>.
For cin -include the header <ostream>.
Paris said:
1 decade ago
iostream is right as it is for both the cin and cout objects.
Sachin said:
1 decade ago
Why iostream is not correct I don't get it?
Pooja Chougule said:
1 decade ago
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.
Operations but, question ask specific to cout thus ostream(stream for output) is more correct.
Pratibha agarwal said:
1 decade ago
I think iostream is correct because it is common and it consist of both input and output.
Saurav Kumar said:
1 decade ago
iostream means both cin and cout, istream means only cin and ostream mean only cout so ostream is correct.
Pooja said:
1 decade ago
I think <iostream.h> is the library function & we can't use it only ostream for cout or istream for cin .
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers