Start learning →

What is the primary role of a constructor in OOP?

AInitializing data members
BCompiling project source
CDestroying old objects
DAllocating disk storage
Answer & Solution
Correct answer: A. Initializing data members
A constructor is primarily tasked with initializing the data members of an object.
Practise this question with Quill — ICSE Class 10 →

Keep practising User-Defined Methods and Constructors

Browse all User-Defined Methods and Constructors questions for ICSE Class 10, or explore more Computer Applications topics.

Start a User-Defined Methods and Constructors lesson →