OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 199
Which of the following is not true in C++ ?
A
“Private” elements of a base class are not accessible by members of its derived class.
B
“Protected” elements of base class are not accessible by members of its derived class.
C
When base class access specified is “Public”, public elements of the base class become public members of its derived class.
D
When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.
Question 199 Explanation: 
TRUE: “Private” elements of a base class are not accessible by members of its derived class.
FALSE: “Protected” elements of base class are not accessible by members of its derived class.
TRUE: When base class access specified is “Public”, public elements of the base class become public members of its derived class.
TRUE: When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.
Correct Answer: B
Question 199 Explanation: 
TRUE: “Private” elements of a base class are not accessible by members of its derived class.
FALSE: “Protected” elements of base class are not accessible by members of its derived class.
TRUE: When base class access specified is “Public”, public elements of the base class become public members of its derived class.
TRUE: When base class access specified is “Public”, protected elements of a base class become protected members of its derived class.

Leave a Reply

Your email address will not be published. Required fields are marked *