C# Programming - Inheritance - Discussion

Discussion :: Inheritance - True or False (Q.No.6)

6. 

If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().

[A]. True
[B]. False

Answer: Option B

Explanation:

It depends upon how the function func() has been defined in the base class. If the function func() is defined public in base class then an object of the derived class can access the function func().

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.