Advertisements
Advertisements
प्रश्न
Which constructor initialises data members with default values?
पर्याय
Parameterized constructor
Non-parameterized constructor
Copy constructor
Default constructor
MCQ
उत्तर
Default constructor
Explanation:
A default constructor takes no parameters and sets the data members' default values (for example, 0 for numeric types, null for objects, and false for booleans). If a class does not have a constructor declared, the compiler will provide one by default.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?