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

Answer Posted / priya

public: class members are access from the outside the class
private: class members can access only within the class
protected:class members can access inside the same package

Is This Answer Correct ?    104 Yes 51 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ofstream c++?

581


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

626


Explain shallow copy?

606


Which is most difficult programming language?

574


When should overload new operator on a global basis or a class basis?

602






What is a constant? Explain with an example.

546


Write a c program for binary addition of two 8 bit numbers.

3655


What is an accessor in c++?

610


write a programme to get a character and thier ASCII value

2588


What is basic if statement syntax?

557


Write about the retrieval of n number of objects during the process of delete[]p?

562


Describe the process of creation and destruction of a derived class object?

634


What are maps in c++?

492


Tell me can a pure virtual function have an implementation?

545


What is abstraction with real time example?

608