MCQOPTIONS
Bookmark
Saved Bookmarks
→
C++ Programming
→
Constructors And Destructors in C++ Programming
→
It is a __________ error to pass arguments to a de..
1.
It is a __________ error to pass arguments to a destructor.
A.
logical
B.
virtual
C.
syntax
D.
linker
Answer» D. linker
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the technical word for the function defined in the following program?
Which of the following statement is correct about the program given below? #include<iostream.h> class IndiaBix { int x, y; public: IndiaBix() { x = 0; y = 0; } IndiaBix(int xx, int yy) { x = xx; y = yy; } IndiaBix(IndiaBix *objB) { x = objB->x; y = objB->y; } void Display() { cout<< x << " " << y; } }; int main() { IndiaBix objBix( new IndiaBix(20, 40) ); objBix.Display(); return 0; }
What will be the output of the following program? #include<iostream.h> class BixBase { public: BixBase() { cout<< "Base OK. "; } virtual ~BixBase() { cout<< "Base DEL. "; } }; class BixDerived: public BixBase { public: BixDerived() { cout<< "Derived OK. "; } ~BixDerived() { cout<< "Derived DEL. "; } }; int main() { BixBase *basePtr = new BixDerived(); delete basePtr; return 0; }
Which of the following statement is correct about the program given below? #include<iostream.h> class IndiaBix { int x; public: IndiaBix() { x = 0; } IndiaBix(int xx) { x = xx; } IndiaBix(IndiaBix &objB) { x = objB.x; } void Display() { cout<< x << " "; } }; int main() { IndiaBix objA(25); IndiaBix objB(objA); IndiaBix objC = objA; objA.Display(); objB.Display(); objC.Display(); return 0; }
What will be the output of the following program? #include<iostream.h> class BixBase { public: int x, y; BixBase(int xx = 0, int yy = 5) { x = ++xx; y = --yy; } void Display() { cout<< --y; } ~BixBase(){} }; class BixDerived : public BixBase { public: void Increment() { y++; } void Display() { cout<< --y; } }; int main() { BixDerived objBix; objBix.Increment(); objBix.Display(); return 0; }
What will be the output of the following program? #include<iostream.h> class IndiaBix { int x, y; public: IndiaBix(int xx) { x = ++xx; } ~IndiaBix() { cout<< x - 1 << " "; } void Display() { cout<< --x + 1 << " "; } }; int main() { IndiaBix objBix(5); objBix.Display(); int *p = (int*) &objBix; *p = 40; objBix.Display(); return 0; }
What will be the out of the following program? #include<iostream.h> class BixBase { public: int x, y; public: BixBase(int xx = 0, int yy = 0) { x = xx; y = yy; } }; class BixDerived : public BixBase { private: BixBase objBase; public: BixDerived(int xx, int yy) : BixBase(xx), objBase(yy) { cout << x << " " << this->x << " " << BixBase::x << " " << this->objBase.x ; } ~BixDerived() { } }; int main() { BixDerived objDev(11, 22); return 0; }
Which of the following constructor is used in the program given below? #include<iostream.h> class IndiaBix { int x, y; public: IndiaBix(int xx = 10, int yy = 20 ) { x = xx; y = yy; } void Display() { cout<< x << " " << y << endl; } ~IndiaBix() { } }; int main() { IndiaBix objBix; objBix.Display(); return 0; }
What will be the output of the following program? #include<iostream.h> class BixBase { public: BixBase() { cout<< "Base OK. "; } ~BixBase() { cout<< "Base DEL. "; } }; class BixDerived: public BixBase { public: BixDerived() { cout<< "Derived OK. "; } ~BixDerived() { cout<< "Derived DEL. "; } }; int main() { BixBase *basePtr = new BixDerived(); delete basePtr; return 0; }
What is the technical word for the function ~IndiaBix() defined in the following program? #include<iostream.h> class IndiaBix { int x, y; public: IndiaBix(int xx = 10, int yy = 20 ) { x = xx; y = yy; } void Display() { cout<< x << " " << y << endl; } ~IndiaBix() { } }; int main() { IndiaBix objBix; objBix.Display(); return 0; }
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply