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

Cpp Programming Quiz 135 – Which of the following statements is correct?

Question: Which of the following statements is correct?
[A]. Data items in a class must be private.
[B]. Both data and functions can be either private or public.[C]. Member functions of a class must be private.
[D]. Constructor of a class cannot be private.

Answer: Option B