What are the differences between public, private, and
protected access?
Answer Posted / prashant kalmodiya
PUBLIC: Specifies that those all members are accessible
from any function.
PRIVATE: Specifies that those members are accessible only
from member functions and friends functions of the class.
PROTECTED: Specifies access to class members in the member-
list up to the next access specifier (public or private)
Is This Answer Correct ? | 18 Yes | 8 No |
Post New Answer View All Answers
Can we specify variable field width in a scanf() format string? If possible how?
Differentiate between the message and method in c++?
If a header file is included twice by mistake in the program, will it give any error?
Explain what are single and multiple inheritances in c++?
What are the extraction and insertion operators in c++? Explain with examples.
What gives the current position of the put pointer?
How do you define a class in c++?
How do I write a c++ program?
What is ios class in c++?
What is the main purpose of overloading operators?
Can we make copy constructor private in c++?
Explain how to initialize a const member data.
Is java a c++?
What does new do in c++?
How to declaring variables in c++?