R

Ram Sharma • 193.86K Points
Coach

Q. Which of the following is true about constructors in C++?

  • (A) They have the same name as the class
  • (B) They do not have a return type
  • (C) They are automatically called when an object is created
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 42
  • Filed under category C++

Explanation by: Ram Sharma
Constructors in C++ have the same name as the class, do not have a return type, and are automatically invoked when an object is instantiated.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics