If input and output operations have to be performed on a file, an object of the _______ class should be created.
Correct Answer: fstream
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C++ Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C++ MCQ Questions
Output of the following code? class A { public: A():pData(0){} ~A(){} int operator ++() { pData++; cout << 'In first '; return pData; } int operator ++(int) { pData++; cout << 'In second '; return pData; } private: int pData; }; void main() { A a; cout << a++; cout << ++a; }
Which member functions can be used to add an element in an std::vector?
Output of the following code? #include using namespace std; class myclass { private: int number; public: myclass() { number = 2; } int &a() { return number; } }; int main() { myclass m1,m2; m1.a() = 5; m2.a() = m1.a(); cout << m2.a(); return 0; }
Consider the following code: #include using namespace std; class A { public: A() { cout << 'Constructor of A\n'; }; ~A() { cout << 'Destructor of A\n'; }; }; class B { public: B() { cout << 'Constructor of B\n'; }; ~B() { cout << 'Destructor of B\n'; }; }; class C { public: A objA; B objB; }; int main() { C *pC; pC = new C(); delete pC; return 0; } What will be the printed output?
Answer the question that follows. class Person { public: Person(); virtual ~Person(); }; class Student : public Person { public: Student(); ~Student(); }; main() { Person *p = new Student(); delete p; } Why is the keyword 'virtual' added before the Person destructor?
________ must be included in any program that uses the cout object.
________ are c++ operators that change their operands by one.
____ consists of 65,536 characters.
Subscript numbering in c++________.
Every complete c++ program must have a __________.