A

Admin • 833K Points
Coach

Q. Which of the following statements is true about C++ classes?

  • (A) A class cannot have private members.
  • (B) A class can have both data members and member functions.
  • (C) A class must always have a constructor.
  • (D) A class cannot be instantiated.
  • Correct Answer - Option(B)
  • Views: 18
  • Filed under category C++
  • Hashtags:

Explanation by: Admin

In C++, a class can contain both data members and member functions.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.