What are the differences between public, private, and
protected access?

Answer Posted / bebo

prvate:is accessed by members of that class only.

public:is accessed by members of any class

protected: variables that are visible only
to the class to which they belong, and any subclasses.

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between inline functions and macros?

598


What does it mean to declare a member function as static?

609


What kind of jobs can I get with c++?

593


Differentiate between structure and class in c++.

595


Is it possible to write a c++ template to check for a function's existence?

576






what does the following statement mean? int (*a)[4]

617


What are manipulators in c++ with example?

580


What is switch case in c++ syntax?

622


What is the best c++ ide?

599


What is a syntax in c++?

604


Why are pointers not used in c++?

626


What is the benefit of encapsulation?

594


What are built-in functions? What is the syntax for the definition?

564


What is pointer with example?

560


What is the latest version on c++?

681