Home / Programming MCQs / C++ MCQs / Question

D

Dharmendra Sir • 3.53K Points
Extraordinary

Q. Is it mandatory to call a constructor to create an object?

(A) Yes
(B) No
(C) NA
(D) NA
Explanation by: Dharmendra Sir
Yes, you need a constructor every time you create an object in C++. If you do not specify any value for the object, then a default constructor is called and automatically assigns a default value to class variables.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.