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
Explain what is class definition in c++ ?
What is the copy-and-swap idiom?
What do you mean by function and operator overloading in c++?
Can we make copy constructor private in c++?
Can you please explain the difference between overloading and overriding?
What are arrays c++?
Why c++ is better than c language?
What is the meaning of string in c++?
What are the important differences between c++ and java?
Write about the use of the virtual destructor?
Which is better c++ or java?
Show the declaration for a static member variable.
What is an undefined reference/unresolved external symbol error and how do I fix it?
What is a .lib file in c++?
Explain what data encapsulation is in c++?