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

Answer Posted / abhay

public-->inherite the protected members as preotected in
drived class and pubic members wiull be public in derived
class

protected--->pubic and protecated members of the base class
will become protected in derived class

Private-->pubilc and proteacted members will become private
in derived class

Is This Answer Correct ?    14 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ostream in c++?

567


What is the difference between set and map in c++?

606


Explain the problem with overriding functions

604


What is heap sort in c++?

596


Why do we need templates?

540






How a new element can be added or pushed in a stack?

581


What is difference between class and structure in c++?

623


What are stacks? Give an example where they are useful.

592


Can turbo c++ run c program?

629


What are the advantages of inheritance in c++?

655


Will the following program execute?

557


Which coding certification is best?

568


What flag means?

522


What is diamond problem in c++?

538


What is the type of 'this' pointer?

598