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 / kamlesh

How do u expect a private part of a class to be inheritable
Do u have any code to support your views
I am ready to solve the same

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When not to use object oriented programming?

748


#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3491


State what is encapsulation and friend function?

910


Why is encapsulation used?

743


What is the oops and benefits of oops programming?

715


What is inheritance and how many types of inheritance?

796


What is oops and why we use oops?

763


What is pointer in oop?

715


Which language is pure oop?

731


What is multilevel inheritance?

918


What are the types of abstraction?

740


What is multilevel inheritance in oop?

747


Write a c++ program to display pass and fail for three student using static member function

3060


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

1850


What is encapsulation example?

730