What is public, protected, private?

Answer Posted / yughandhar

public:
public is an access specifier which can be used throughout
the program.
protected:
protected is an access specifier which can be used in the
specified class and its derived class...
private:
private is an access speifier which can be used whithin the
class in which it is declared.

These three access specifiers are used for providing the
security

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give two or more real cenario of virtual function and vertual object

1855


when to use 'mutable' keyword and when to use 'const cast' in c++

1648


What is difference between data abstraction and encapsulation?

619


Write a c++ program to display pass and fail for three student using static member function

2818


Why do pointers exist?

663






How many human genes are polymorphic?

575


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2008


What is polymorphism and types?

602


What is polymorphism and example?

593


write knight tour problem which is present in datastructure

2168


Explain the concepts involved in Object Oriented programming.

642


How do you achieve runtime polymorphism?

573


What is meant by multiple inheritance?

740


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1409


what is the 3 types of system development life cycle

2435