When a private constructer is being inherited from one
class to another class and when the object is instantiated
is the space reserved for this private variable in the
memory??

Answer Posted / balakishore

before invoking derived class constructor base-class
constructor should be called.
1. first base-class object will be created then derived-
class object will be created.
2. here the base class constructor is private, so derived-
class cannot invoke it.

No object is created in derived-class.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are main features of oop?

637


What is property in oops?

571


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1702


What is the difference between a mixin and inheritance?

524


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1395






Why do pointers exist?

665


What are the 3 principles of oop?

621


What is this pointer in oop?

557


I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...

1632


What is abstraction in oops?

591


Why interface is used?

555


How can you overcome the diamond problem in inheritance?

772


Why is there no multiple inheritance?

572


what is the sylabus for priliminaries?

1691


What is encapsulation selenium?

554