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

What polymorphism means?

709


class type to basic type conversion

1945


what is difference between class template and template class?

2252


How do you define a class in oop?

736


If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?

1021






What is the real time example of inheritance?

728


Why interface is used?

646


What does oop mean in snapchat?

800


Which is not an object oriented programming language?

631


Where You Can Use Interface in your Project

1510


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2677


when to use 'mutable' keyword and when to use 'const cast' in c++

1753


What is inheritance and how many types of inheritance?

709


How oops is better than procedural?

679


Templates mean

1676