1.

The data members and functions of a class in C++ are by default ____________(a) protected(b) private(c) public(d) public & protectedThe question was asked in an interview for job.My doubt stems from Classes in section Source Files, Classes and Operator Overloading in C++ of C++

Answer»

The correct OPTION is (b) PRIVATE

To EXPLAIN: By DEFAULT all the data members and member functions of class are private.



Discussion

No Comment Found

Related InterviewSolutions