What are the differences between public, private, and
protected access?
Answer Posted / golledla prathap reddy
public data can access anybody in the program.
private data can access olny members of that class.
protected also same like private but the difference is it
can access by derive class also.
we can see the use of protected data in inheritance.
| Is This Answer Correct ? | 64 Yes | 12 No |
Post New Answer View All Answers
Difference between struct and class in terms of access modifier.
Why should we use null or zero in a program?
What are references in c++?
What are shallow and deep copy?
What is capacity in vector in c++?
How can a called function determine the number of arguments that have been passed to it?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Write a program to show polymorphism in C++?
Is c++ a float?
What are the 3 levels of programming languages?
List the features of oops in c++?
What is while loops?
Define private, protected and public access control.
Differentiate between the manipulator and setf( ) function?
What are the differences between new and malloc?