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

Answer Posted / girish kumar

publc: variable declare in public can be access anywhere in the program i.e. other classes can also use same variable which are declare once.
private:variable declare in private can't be access outside the class in which it is declare .Variable are only access in the same class.

Is This Answer Correct ?    24 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of ios::basefield in the following statement?

796


What are special characters c++?

572


Will rust take over c++?

598


If a function doesn’t return a value, how do you declare the function?

622


what is a reference variable in C++?

674






what do you mean by volatile variable?

593


What gives the current position of the put pointer?

569


What is encapsulation in c++?

676


How does work in c++?

602


Do class method definitions?

593


What are guid?

695


What is flag in computer?

610


What is general format for a prototype?

603


Discuss the possibilities related to the termination of a program before entering the mainq method?

547


Explain shallow copy?

618