Question
a.
the ofstream class is a stream
b.
the insertion operator works with all classes
c.
we are actually outputting to cout
d.
the insertion operator is overloaded in ofstream
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. We can output text to an object of class ofstream using the insertion operator « because
Similar Questions
Discover Related MCQs
Q. When you write to a file rather than the screen, you use the C++ class _____
View solution
Q. Which of the following statements opens a file named temp.dat for output?
View solution
Q. Which of the following will store the letter H in a Character variable named initial?
View solution
Q. Which of the following creates a String named constant called partNo, whose value is AB45?
View solution
Q. The function strcmp("Jose", "JOSE") will return _____
View solution
Q. The standard output stream, which refers to the computer screen, is called
View solution
Q. Which of the following is a string literal constant?
View solution
Q. Which is an instantiation of the basic_string class template?
View solution
Q. Which character is used to terminate the string?
View solution
Q. How does the strings are stored in the memory?
View solution
Q. Where are the strings stored?
View solution
Q. What will happen if a string is empty?
View solution
Q. Which header file is used to manipulate the string?
View solution
Q. How many maximum number of parameters does a string constructor can take?
View solution
Q. Which constant member functions does not modify the string?
View solution
Q. What is the difference between unsigned int length() and unsigned int size()?
View solution
Q. How many parameters can a resize method take?
View solution
Q. Where are standard C libraries defined in C++?
View solution
Q. Which of the following have their changes in their declaration related to constness of parameter?
View solution
Q. How many elements does a floating point number is composed of?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!