Multiple choice technology programming languages

Reference to its own class can be accepted by:

  1. Simple constructor

  2. parameterized constructor

  3. copy constructor

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

A copy constructor accepts a reference to an object of its own class, typically declared as ClassName(const ClassName& obj). This allows creating new objects by copying existing ones, while simple constructors initialize without references and parameterized constructors accept different argument types.