What is the difference between public, private, protected
inheritance?
Answer Posted / girish kumar
publc: variable declare in public can be access anywhere in the program i.e. other classes can also use same variable which are declare once.
private:variable declare in private can't be access outside the class in which it is declare .Variable are only access in the same class.
Is This Answer Correct ? | 24 Yes | 3 No |
Post New Answer View All Answers
When can I use a forward declaration?
What is std namespace in c++?
What is istream c++?
What is the difference between a declaration and a definition?
When should we use container classes instead of arrays?
What is auto used for in c++?
What is istream and ostream in c++?
What is namespace & why it is used in c++?
What is encapsulation in c++ with example?
what are Access specifiers in C++ class? What are the types?
What is the difference between public and private data members?
What is a hash function c++?
What is stl containers in c++?
What is the use of lambda in c++?
What are the advantages of c++ over c?