what is the difference between class and object?

Answers were Sorted based on User's Feedback



what is the difference between class and object?..

Answer / jayasrinivas.donavalli

class:class is an abstract data type in which both Member
functions and member variable are declared that means
aclass is userdefined data type in which we will be able to
declare both methods and variable.
object : Object is an Instance of the class.The class is a
valid one when object is created.
For one class we will have more number of Objects.
declaration of class in
class classname
{
public:
Member variables;
Member functions();
protected:
Member variables;
Member functions();
Private:
Member variables;
Member functions();
};
Declaration of Objects:
class classname allaisname;
here allias name is nothing but objectname.
if we want to get the data from that particular we have to
use objects.
objectname.functionname();

Is This Answer Correct ?    26 Yes 4 No

what is the difference between class and object?..

Answer / s.jagadeeswari

Class is just a template. It does not allocate memory
space. When instantiate the object, allocates the memory
space

Is This Answer Correct ?    22 Yes 6 No

what is the difference between class and object?..

Answer / walking legend

I would like to explain the concept of class and object
with an example for easy understanding
consider a person 'x' has designed a car drawing the
model on a paper on computer using a software
class:this blue print is called class.
object:if a car is manufactured based on the blue print
it is one of the object created for that
particular class.

Is This Answer Correct ?    15 Yes 7 No

what is the difference between class and object?..

Answer / meganathan

Class is container of data.

Object is run time entity.

Is This Answer Correct ?    8 Yes 1 No

what is the difference between class and object?..

Answer / rahul

Class : class ia a blueprint or prototype from which object
are created
Object: Object is a Software bundles of related state and
behavior.

Is This Answer Correct ?    14 Yes 9 No

what is the difference between class and object?..

Answer / rashid

Class is nothing but it is the collection of data member and
variable while object is an instance of a class.

Is This Answer Correct ?    5 Yes 1 No

what is the difference between class and object?..

Answer / p.madhupriya

object is real world entity.
class is a collection of objects and member function .

Is This Answer Correct ?    8 Yes 5 No

what is the difference between class and object?..

Answer / tejapotnuru

class is designing of a house
constructed house is called object

Is This Answer Correct ?    6 Yes 5 No

what is the difference between class and object?..

Answer / sanjith

Actually,
*Class is a collection of general declarations for data members and member functions ,that means it doesnot hold any memory.

*when we give certain values to a class ,objects are created.
that means a memory is allocated when objects are created.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

Please tell me the oops concept with detailed answer

9 Answers   EEE,


what is the main difference between c and c++?

386 Answers   AZTEC, B.Tech, CMC, College School Exams Tests, HCL, IBM, ITM, Khalsa Institute, Microsoft, Oracle, Sanjeevni Institute, TCS, Tech Mahindra, Wipro, ZeOmega,


OOP'S advantages of inheritance include:

1 Answers   Infosys,


What are oops methods?

0 Answers  


in the following, A D B G E C F Each of the seven digits from 0,1,2,3,4,5,6,7,8,9 is: a)Represented by a different letter in abov fig: b)Positioned in the fig abov so tht A*B*C,B*G*E,D*E*F are equal. wch does g represents? C

1 Answers   IonIdea,






What are the benefits of polymorphism?

0 Answers  


What is advantage of inheritance?

0 Answers  


Why do while loop is used?

0 Answers  


How do you define a class in oop?

0 Answers  


why to use template classes in c++?

1 Answers  


What is the highest level of cohesion?

0 Answers  


How long to learn object oriented programming?

0 Answers  


Categories