What is the difference between public, private, protected
inheritance?

Answer Posted / vivek kumar kaushal

Public: this is member function of its own and anyother
class.
Private: Class member access within its class.
Protected:this is member function to its own and derived
class.

Is This Answer Correct ?    34 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can malloc be used in c++?

801


Define pointers?

813


What are pointer-to-members? Explain.

813


Why do we need templates?

746


What is buffering in c++?

814


What is the use of 'using' declaration in c++?

858


What is difference between n and endl in c++?

777


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

819


What is the use of seekg in c++?

798


What is the size of a vector?

807


How long it will take to learn c++?

800


Which of the following is evaluated first: a) && b) || c) !

2065


What is data type in c++?

761


What is const pointer and const reference?

830


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2226