What is the relation between object and class in an object-oriented programming?

2021

What is the relation between object and class in an object-oriented programming?

  1. A.

    Object is keyword of class

  2. B.

    Object is scope of class

  3. C.

    Object is instance of class

  4. D.

    Object is type of class

Attempted by 344 students.

Show answer & explanation

Correct answer: C

In Object-Oriented Programming (OOP), a class is a blueprint or template that defines properties and behaviors. An object is a real entity created from that class.

Therefore, an object is called an instance of a class.

Example:

class Car { };
Car c1;

Here, Car is a class and c1 is its object (instance).

Explore the full course: Up Lt Grade Assistant Teacher 2025