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
What are main features of oop?
What is property in oops?
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
What is the difference between a mixin and inheritance?
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?
Why do pointers exist?
What are the 3 principles of oop?
What is this pointer in oop?
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...
What is abstraction in oops?
Why interface is used?
How can you overcome the diamond problem in inheritance?
Why is there no multiple inheritance?
what is the sylabus for priliminaries?
What is encapsulation selenium?