Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming Quiz 45 – Which of the following is correct about class and structure?

Question: Which of the following is correct about class and structure?
[A]. class can have member functions while structure cannot.
[B]. class data members are public by default while that of structure are private.[C]. Pointer to structure or classes cannot be declared.
[D]. class data members are private by default while that of structure are public by default.

Answer: Option D