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 / sanjay makwana, puna
Private Constructor is not inherited.
When private member varible is not inherited but the size is
occupid in dervied class object.
e.g.
#include <iostream.h>
class A
{
int x;
int y;
};
class B : private A
{
};
int main()
{
cout << sizeof(B);
}
output :
8
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do you define social class?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
How is polymorphism achieved?
What are the two different types of polymorphism?
How do you explain polymorphism?
What is use of overloading?
What are the 4 pillars of oop?
What is the point of oop?
i got a backdoor offer in process global,Bangalore..Can i work with it?
what is the sylabus for priliminaries?
Who invented oop?
What is a superclass in oop?
Where is pseudocode used?
What are the benefits of interface?
Why is abstraction needed?