WHAT IS THE ACTUAL DEFINATION OF OBJECT AND THE CLASS IN ONE
SINGLE LINE WHICH THE INTERVIEWER WANT TO LISTEN.

Answer Posted / pranay agarwal

class is a template that contain data and functions, an
object can use this template any no. of times .

object is instance of class.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of enum?

579


Do you know about multiple inheritance?

637


Why is polymorphism used?

582


what's the basic's in dot net

1736


What are the benefits of oop?

604






What is the fundamental idea of oop?

634


What is difference between class and object with example?

562


What is destructor in oop?

621


What is use of overloading?

604


What are functions in oop?

582


Why do we use encapsulation in oops?

518


What is class and example?

567


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

3246


How to hide the base class functionality in Inheritance?

636


What do you mean by variable?

572