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
What is balance factor?
What are the data types in oop?
what type of questions
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
Why do pointers exist?
What are oops methods?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
Is enum a class?
Is data hiding and abstraction same?
What is abstraction in oop with example?
Can a varargs method be overloaded?
What is object and example?
What is variable example?
What is encapsulation and abstraction? How are they implemented in C++?
What is polymorphism and types?