Which of the following statements is correct about the class?

2023

Which of the following statements is correct about the class?

  1. A.

    An object is an instance of its class.

  2. B.

    A class is an instance of its object.

  3. C.

    An object is the instance of the data type of that class.

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 295 students.

Show answer & explanation

Correct answer: A

In Object-Oriented Programming (OOP), a class is a blueprint or template used to create objects. An object is a real entity created from a class.

For example:

class Student
{
};

Here, Student is a class.

Student s1;

Here, s1 is an object (instance) of the Student class.

Therefore, the correct statement is:

“An object is an instance of its class.”

Explore the full course: Up Lt Grade Assistant Teacher 2025