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

What is advantage of inheritance?

1127


What is overriding vs overloading?

1004


What is abstraction in oops?

978


Explain the concepts involved in Object Oriented programming.

1142


What is protected in oop?

1009


What is the renewal class?

2683


What does and I oop and sksksk mean?

1106


What is encapsulation example?

981


what is difference between class template and template class?

2596


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2563


What is the oops and benefits of oops programming?

924


Can an interface inherit a class?

1009


Can a varargs method be overloaded?

1037


What is oops?what is its use in software engineering?

971


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

2192