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 / sillu nu oru c coder
When a constructor is made private, object of that class
can not be created. That is called as Abstract class.
constructors can not be inherited. Moreover, when this
class is inherited, the base class object can not be
created. So we can not create the derived class object
also.
the above ans is irrelevant to the current situation,
here the thing is, a constructor cannot b private coz there
is no use of .
but if a situation occurs as such in the given prob, yes the
space is reserved for that useless private constructor.
Is This Answer Correct ? | 2 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?
What is polymorphism oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is difference between data abstraction and encapsulation?
What is difference between pop and oop?
How to use CMutex, CSemaphore in VC++ MFC
Why interface is used?
what type of question are asked in thoughtworks pair programming round ?
what is different between oops and c++
what is the sylabus for priliminaries?
What is abstraction in oops?
What do you mean by variable?
What is difference between inheritance and polymorphism?
what are the ways in which a constructors can be called?
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.