A

Admin • 802.91K Points
Coach

Q. Which of the following is the correct way to define a constructor in C++?

  • (A) MyClass() { }
  • (B) void MyClass() { }
  • (C) int MyClass() { }
  • (D) None of the above
  • Correct Answer - Option(A)
  • Views: 4
  • Filed under category C++
  • Hashtags:

Explanation by: Admin
The correct way to define a constructor is 'MyClass() { }'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.