Computer Science - Object Oriented Programming Using C++ - Discussion
Discussion Forum : Object Oriented Programming Using C++ - Section 2 (Q.No. 34)
34.
If a derived class uses the public access specifier, then _____
Discussion:
3 comments Page 1 of 1.
Ayesha.. said:
3 years ago
Public inheritance
When a class uses public member access specifier to derive from a base, all public members of the base class are accessible as public members of the derived class and all protected members of the base class are accessible as protected members of the derived class (private members of the base are never accessible unless friended).
public base class members remain public in the derived class.
protected base class members become protected in the derived class.
Answer is: A.
When a class uses public member access specifier to derive from a base, all public members of the base class are accessible as public members of the derived class and all protected members of the base class are accessible as protected members of the derived class (private members of the base are never accessible unless friended).
public base class members remain public in the derived class.
protected base class members become protected in the derived class.
Answer is: A.
Rashi Jain said:
5 years ago
I too agree C is the correct option.
Vijaya said:
7 years ago
I think option C is the correct answer.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers