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

Answer Posted / prashanth c patel

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 ?    21 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does iomanip mean in c++?

606


What parameter does the constructor to an ofstream object take?

615


Is it possible to write a c++ template to check for a function's existence?

580


Is map sorted c++?

521


Can comments be nested?

631






Explain the uses of static class data?

599


What is a dynamic binding in c++?

537


What is null pointer and void pointer?

630


What is the first name of c++?

568


Explain the virtual inheritance in c++.

601


Write about an iterator class?

614


If a header file is included twice by mistake in the program, will it give any error?

552


How do you traverse a btree in backward in-order?

626


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

551


How can you create a virtual copy constructor?

587