C++ Programming - Objects and Classes - Discussion

Discussion Forum : Objects and Classes - General Questions (Q.No. 19)
19.
Which of the following statements is correct?
Data items in a class must be private.
Both data and functions can be either private or public.
Member functions of a class must be private.
Constructor of a class cannot be private.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
12 comments Page 2 of 2.

Jay said:   1 decade ago
Constructor can be private bt it cannot call outside the class when object is declared...

Likitha said:   1 decade ago
How can constructors be private?


Post your comments here:

Your comments will be displayed after verification.