What are the differences between public, private, and
protected access?

Answer Posted / kalpana.y


Private is used for intialization of variables
eg:
int p,r;
public is used for function name
eg:
void display();
protected is used for void main()

eg:
void main()
class c;

Is This Answer Correct ?    24 Yes 86 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are exceptions c++?

598


Explain virtual destructor?

677


what is the use of void main() in C++ language?

642


Incase of a function declaration, what is extern means?

521


Is c++ map a hash table?

568






Which of the following is evaluated first: a) && b) || c) !

1810


What apps are written in c++?

607


daily Routine of father

914


What is the difference between equal to (==) and assignment operator (=)?

582


Is dev c++ free?

616


Mention the ways in which parameterized can be invoked.

540


What is the best c++ compiler?

596


Do vectors start at 0?

596


Do you know what is overriding?

619


How do I run a program in notepad ++?

608