A constructor is called whenever

2023

A constructor is called whenever

  1. A.

    an object is created

  2. B.

    a class is created

  3. C.

    a class is declared

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 152 students.

Show answer & explanation

Correct answer: A

A constructor is a special member function that is invoked when an object is created. It initializes the newly created object, so the correct option is an object is created.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs