CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Objects of the class can directly use any member function declared in the __________________________.

A
privat and protected sections only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
public and protected sections only
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
public section only
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
public, protected and private section
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C public section only

Objects of the class can directly use any member function declared in the public section only.

An object is an instantiation of a class. Public members are accessible from anywhere where the object is visible. Public class members and functions can be used from outside of a class by any function or other classes. We can access public data members or function directly by using dot operator (.).


flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
The Ones Responsible
HISTORY
Watch in App
Join BYJU'S Learning Program
CrossIcon