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 the use of c++ programming language in real life?

571


What are the implicit member functions of class?

601


What are literals in C++?

603


Write a program in C++ for Fibonacci series

667


List the special characteristics of constructor.

736






What are static and dynamic type checking?

620


What is the benefit of encapsulation?

598


What is the difference between the parameter to a template and the parameter to a function?

644


What is malloc in c++?

561


What do the header files usually contains?

640


Can we make any program in c++ without using any header file and what is the shortest program in c++.

621


How is c++ used in the real world?

577


Can we distribute function templates and class templates in object libraries?

597


How to access a variable of the structure?

586


What will the line of code below print out and why?

332