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.
Shubham said:
1 decade ago
Please explain this. I'm also confused between iostream and ostream.
M. azhar faroq said:
1 decade ago
iostream is correct it is used in both cin and cout?
Mandy said:
1 decade ago
I think so iostream is the correct answer because it includes both input AND output i.e. I and O.
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 .
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.
Pratibha agarwal said:
1 decade ago
I think iostream is correct because it is common and it consist of both input and output.
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.
Amruta said:
1 decade ago
In iostream, 'i ' is input and 'o' is output. And cin object is used based on 'i' stream and cout as 'o' stream
Paris said:
1 decade ago
iostream is right as it is for both the cin and cout objects.
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>.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers