what is single inheritance?

Answer Posted / dev

When a derived class has only one base class its called a
single inheritance

Is This Answer Correct ?    106 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#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.

3534


What is coupling in oop?

800


What is the oops and benefits of oops programming?

765


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1651


what's the basic's in dot net

1956


Why interface is used?

778


What is difference between polymorphism and inheritance?

843


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4516


Whats is abstraction in oops?

857


What is balance factor?

848


Why oops is important?

813


Why do we use class?

844


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

4381


What are objects in oop?

858


What is class and object with example?

844