OOPS MCQ Questions and Answers Pdf - 1

Question: 1

In the case of inheritance, there are situations where the member function of the base class and derived classes have the same name. The _____ operator resolves this problem.

(A) Scope resolution

(B) Conditional

(C) Membership

(D) None of these

Ans: A

Scope resolution

Question: 2

_____ members of the base class can be indirectly accessed by the derived class using the public or protected member function of the base class.

(A) Public

(B) Private

(C) Protected

(D) Either A or B or C

Ans: B

Private

Question: 3

_____ member function has the access privilege for the private members of the base class.

(A) Public

(B) Private

(C) Protected

(D) Both A and C

Ans: D

Both A and C

Question: 4

If there are multiple base classes, then it starts executing from the _____ base class.

(A) Leftmost

(B) Rightmost

(C) Compiler decided

(D) None of these

Ans: A

Leftmost

Question: 5

Which of the following is true with respect to inheritance?

(A) Private members of base class are not inherited to the derived class with private accessibility

(B) Public members of base class are inherited but not visible to the derived class

(C) Protected members of base class are inherited but not visible to the outside class

(D) Private members of base class are inherited to the derived class with private

Ans: A

Private members of base class are not inherited to the derived class with private accessibility

Related Questions