A

Admin • 833K Points
Coach

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

  • (A) class MyClass { };
  • (B) class MyClass { public: };
  • (C) class MyClass { private: };
  • (D) All of the above
  • Correct Answer - Option(D)
  • Views: 22
  • Filed under category C++
  • Hashtags:

Explanation by: Admin

All the options are valid ways to define a class in C++.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.