wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Derived class is a accessed in object oriented programming

A
Base class with protected
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
Base class with private
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Private
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
None of the above
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A Base class with protected

Derived class is an accessed in object oriented programming base class with protected.

Protectedmembers similar to private members, can be accessed only by code in the same class or struct, or in a class that is derived from that class. Public, private and protected are called as access modifiers in object-oriented languages.

A derived class can access all the non-private members of its base class. Thus base-class members that should not be accessible to the member functions of derived classes should be declared private in the base class. Constructors, destructors and copy constructors of the base class.

Derivation allows us to derive a class, called a derived class, from another class, called a base class. In the declaration of a derived class, we list the base classes of the derived class.



flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Database Structuring
ACCOUNTANCY
Watch in App
Join BYJU'S Learning Program
CrossIcon