Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is a superclass in oop?

1109


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2494


What is polymorphism and types?

1039


What is overriding vs overloading?

1004


Why is object oriented programming so hard?

1022


What is a class in oop?

1044


How oops is better than procedural?

1025


What is oops concept with example?

967


What is class in oop with example?

1039


class type to basic type conversion

2337


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

2148


What are the benefits of polymorphism?

1161


What is multilevel inheritance?

1150


What is encapsulation in oops?

955


How to improve object oriented design skills?

945