All mock tests are FREE till 31 December — register to save your progress
Unit 3 · Programming Concepts & Python HTET 2021 PGT Computer Science

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