GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 10 of 203    Print  
What is the difference between an object and a class?
 Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.
 
Ø      A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
Ø       The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.
Ø       An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.



  
Total Answers and Comments: 11 Last Update: October 19, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 08, 2005 08:17:12   #1  
vishnu bobade        

RE: What is the difference between an object and a class?
Classes and Objects: Classes are explained focusing on member data and methods as well as access control. Constructors and destructors are introduced and the difference between interface and implementation is emphasized.

 
Is this answer useful? Yes | No
September 15, 2005 05:57:08   #2  
neeraj        

RE: What is the difference between an objec...
paper
 
Is this answer useful? Yes | No
November 19, 2005 06:03:00   #3  
asifbhimla Member Since: November 2005   Contribution: 1    

RE: What is the difference between an objec...
Object is an instance of a classm while a class can have many objects. Class is a static entity while object is a dynamic entity.
 
Is this answer useful? Yes | No
January 17, 2006 04:08:33   #4  
v.chandrasekhar        

RE: What is the difference between an objec...
OBJECTS: Objects are the basic building concepts of oops.Objects are the basic runtime entities in an object oriented sysyem...In other words data and function which combine into a single entity is called object.CLASS: A class combine data(called data members)and functions(called member functions)Class is a logical framework that defines the relationship between it's members and act as a templatefor creating it's variable called objects.
 
Is this answer useful? Yes | No
April 15, 2006 05:19:02   #5  
nitin_chawda Member Since: April 2006   Contribution: 4    

RE: What is the difference between an objec...

Class is a userdefined datatype with data members and member functions which can be public or privately accessed depending on access specifiers.

Objects are instances of classes which identifies the class propeties.A particular class can have it's own class which makes it identifying it's object.


 
Is this answer useful? Yes | No
August 02, 2006 03:58:50   #6  
satyendra n. Das        

RE: What is the difference between an objec...

Class -Classe(s) defines object

Object -Object can't define classes

Class -Object properties can access by class instance on which that object is residing

Object-Should be belonging to any of the class

Object - Can created and destroyed as your necessity.

Class-One class can define any no of Object

Best of Luck

Satya.........


 
Is this answer useful? Yes | No
May 21, 2007 11:48:08   #7  
Sathyanarayanan Ramakrishnan        

RE: What is the difference between an objec...
An object realizes its behaviour and state from its skeleton called class

In other words a realization of a class is an object

Cheers

Sathya

 
Is this answer useful? Yes | No
July 08, 2007 07:41:32   #8  
nishant        

RE: What is the difference between an objec...
I would like to add few more points:

-A Class is a blueprint of an object or we can say that its a template of an object.
-Objects are memebers of a class.
-A class decribes all the attributes of object.

 
Is this answer useful? Yes | No
July 28, 2007 15:30:17   #9  
gaurav        

RE: What is the difference between an objec...
Class: class is a group of a object that shares common property or class is a collection of methods and functionality.

Object is real time entity of class or it is a instance of class

 
Is this answer useful? Yes | No
July 30, 2007 01:54:49   #10  
wafa        

RE: What is the difference between an objec...
class is a group of more than one object and it share common property of object.give anyone any example?
 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape