What is the difference between class and object?

Answer Posted / johncz

Class is a template for the custom type that can be used as
variable. It defines types of data that class contains and
the set of functions to manipulate those data types. It is
just a recipe to be used when class is instantiated.

Object is an entity created using class template. Such an
object occupies computer’s memory. Each object of the class
is independent entity.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1652


explain sub-type and sub class? atleast u have differ it into 4 points?

1830


What is stream in oop?

835


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

1577


What is the benefit of oop?

568






Why is object oriented programming so hard?

612


What are classes oop?

596


What do you mean by overloading?

576


Can bst contain duplicates?

664


What is the point of polymorphism?

582


Templates mean

1587


What is class encapsulation?

584


What is and I oop mean?

616


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1413


What is multilevel inheritance explain with example?

623