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
  • Correct Answer - Option(A)
  • Views: 115
  • Filed under category C++

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.

Be the first to start discuss.


Question analytics