A

Admin • 833K Points
Coach

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

  • (A) A constructor has the same name as the class.
  • (B) A constructor does not have a return type.
  • (C) A constructor can be private.
  • (D) A constructor must be explicitly called when creating an object.
  • Correct Answer - Option(D)
  • Views: 18
  • Filed under category C++
  • Hashtags:

Explanation by: Admin

A constructor is automatically called when an object is instantiated.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.