What is a copy constructor ?
कॉपी कंस्ट्रक्टर क्या है ?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. A constructor to initialize an object with the values of another object.एक कंस्ट्रक्टर जो किसी ऑब्जेक्ट को किसी अन्य ऑब्जेक्ट के मानों या वैल्यू के साथ प्रारंभ करता है।
Explanation
A copy constructor initialises a new object with the values of an existing object of the same class.
कॉपी कंस्ट्रक्टर नए ऑब्जेक्ट को उसी क्लास के किसी मौजूदा ऑब्जेक्ट के मानों से प्रारंभ करता है।
More Programming Concepts & Python questions
- In the given declaration of an array : float height[50];
- The functions 'cin' and 'cout' resolve the necessary conversions at :
- In C++, << operator used for shifting bits can also be used for :
- Which of the following is the scope resolution operator in C++ language ?
- Inheritance allows the following in C++ program :
- A generic function can be created using the following :