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
What is a hashmap c++?
What is format for defining a structure?
What is microsoft c++ redistributable?
How many namespaces are there in c++?
What is else syntax in c++?
What is input operator in c++?
Are strings immutable in c++?
What does catch(…) mean?
How important is c++?
What do nonglobal variables default to a) auto b) register c) static
How do you find out if a linked-list has an end?
What is purpose of new operator?
Does std endl flush?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes