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
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
can we make game by using c
What is abstraction oop?
What is polymorphism oop?
What is a null tree?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
What is the real time example of inheritance?
what are the ways in which a constructors can be called?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is inheritance in oop?
How do you achieve polymorphism?
What is stream in oop?
What is class and object with example?
What are two types of polymorphism?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.