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

Which of the following constructor related concept is non-relevant in C++ ?

कन्स्ट्रक्टर संबंधी सिद्धान्तों में निम्न में से कौन-सा C++ में अप्रासंगिक है ?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. virtual constructorवर्चुअल कन्स्ट्रक्टर

Explanation

C++ has copy, conversion and overloaded constructors, but a constructor can never be virtual (the object's type is not yet known while it is being built). Only destructors can be virtual.

C++ में कॉपी, कन्वर्जन और ओवरलोडेड कन्स्ट्रक्टर होते हैं, पर कन्स्ट्रक्टर कभी virtual नहीं हो सकता। केवल डिस्ट्रक्टर virtual हो सकता है।

More Programming Concepts & Python questions