Question
Easy

_ is used to declare and initialize an object from another object of same class in C++.

1
Copy constructor
2
Default constructor
3
Overloaded constructor
4
Non-parametrized constructor
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter:
Topic:
Correct Answer
Option A
Explanation

The correct option is (1): A Copy constructor is a special member function in C++ explicitly designed for object initialization scenarios where a new object is created as a copy of an existing object of the same class. Its primary role is to ensure that when you declare a new object and initialize it with an old one (e.g., MyClass obj2 = obj1; or MyClass obj2(obj1);), the new object receives…Read More

Is used to - HTET Level 3 | Clear Cutoff