V

Vinay • 28.75K Points
Instructor II

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: 38
  • Filed under category C++

Explanation by: Vinay
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.


Question analytics