difference between class and object

Answer Posted / srinivas konga

class is acollection of methods
it is a logical representation



object is a instance of class

it is physical representation
it is always in local declaration

Is This Answer Correct ?    27 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the point of polymorphism?

598


officer say me - i am offered to a smoking , then what can you say

1586


What is the renewal class?

2171


What are the advantages of polymorphism?

579


How do you define social class?

610






What is meant by multiple inheritance?

744


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1155


What is inheritance in oop?

608


how to get the oracle certification? send me the answer

1676


What is pure oop?

603


Where You Can Use Interface in your Project

1435


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

1786


What is oops and its features?

594


What is polymorphism used for?

579


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

3263