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

Answer Posted / krishnakumar

Modifier | Class | Package | Subclass | World

public | Y | Y | Y | Y

protected | Y | Y | Y | N

no modifier | Y | Y | N | N

private | Y | N | N | N

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is namespace std; and what is consists of?

636


Is c++ slower than c?

546


What are the advantage of using register variables?

610


How are the features of c++ different from c?

569


Is dev c++ a good compiler?

506






Explain how the virtual base class is different from the conventional base classes of the opps.

641


What is the use of namespace std in C++?

588


What is cout flush?

543


Which is better turbo c++ or dev c++?

541


What operator is used to access a struct through a pointer a) >> b) -> c) *

572


What is difference between rand () and srand ()?

566


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

582


What are references in c++? What is a local reference?

551


What is meant by the term name mangling in c++?

498


What is #include c++?

541