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


Please Help Members By Posting Answers For Below Questions

Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3838


What is polymorphism oop?

623


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2008


What is difference between data abstraction and encapsulation?

617


What is difference between pop and oop?

609






How to use CMutex, CSemaphore in VC++ MFC

4332


Why interface is used?

553


what type of question are asked in thoughtworks pair programming round ?

1762


what is different between oops and c++

2001


what is the sylabus for priliminaries?

1691


What is abstraction in oops?

589


What do you mean by variable?

577


What is difference between inheritance and polymorphism?

573


what are the ways in which a constructors can be called?

1583


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.

1794