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 / ankur sehgal

public class TrialClass
{
protected int i, j;
public TrialClass(int one, int two)
{
i = one;
j = two;
}
public TrialClass(int joo)
{

}
public int squareArea()
{
int side1;
int side2;
side1 = i;
side2 = j;
return side1 * side2;
}

}
public class myDerivedClass : TrialClass

{
int rd;
int dr;
public myDerivedClass(int Age, int ages):base(Age)
{
rd = ages;
dr = Age;
}

}

Try making the base class single parameterized constructor
private.You will get your answer.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when to use 'mutable' keyword and when to use 'const cast' in c++

2159


Why do pointers exist?

1088


What is oops and its features?

1079


Why do while loop is used?

1035


explain sub-type and sub class? atleast u have differ it into 4 points?

2315


What is destructor example?

1042


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2148


Can a varargs method be overloaded?

1106


write a programe to calculate the simple intrest and compund intrest using by function overlading

2201


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

2195


Which is not an object oriented programming language?

984


why reinterpret cast is considered dangerous?

2391


What is cohesion in oop?

1054


What is static modifier?

1217


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1853