What are the access specifiers avaible in c++?

Answers were Sorted based on User's Feedback



What are the access specifiers avaible in c++?..

Answer / rajeev kumar rana

private, public, protected

Is This Answer Correct ?    9 Yes 1 No

What are the access specifiers avaible in c++?..

Answer / mayank kumar

private, protected and public

Is This Answer Correct ?    5 Yes 0 No

What are the access specifiers avaible in c++?..

Answer / kanan

public,
private ,
protected ,
internal and
protected internal

public :
public is the most common access specifier in C# . It can be
access from anywhere, that means there is no restriction on
accessibility. The scope of the accessibility is inside
class as well as outside. The type or member can be accessed
by any other code in the same assembly or another assembly
that references it.

private :
The scope of the accessibility is limited only inside the
classes or struct in which they are declared. The private
members cannot be accessed outside the class and it is the
least permissive access level.

protected :
The scope of accessibility is limited within the class or
struct and the class derived (Inherited )from this class.
internal :
The internal access modifiers can access within the program
that contain its declarations and also access within the
same assembly level but not from another assembly.

protected internal :
Protected internal is the same access levels of both
protected and internal. It can access anywhere in the same
assembly and in the same class also the classes inherited
from the same class .

Is This Answer Correct ?    7 Yes 3 No

What are the access specifiers avaible in c++?..

Answer / xxx

The last answer is wrong. internal and Protected Internal
not there in C++. Answer is relevant to C# not C++.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More OOPS Interview Questions

What is the use of oops?

0 Answers  


Describe these concepts: Polymorphism, Inheritance and Abstraction.

0 Answers   TCS,


all about pointers

2 Answers  


Explain the advantages of inheritance.

0 Answers   TCS,


What is encapsulation c#?

0 Answers  






difference between structure and union.

2 Answers   ADP, Convergys,


Which is the parameter that is added to every non-static member function when it is called?

3 Answers   Accenture,


what is virtual function?

26 Answers   Aspire, HP, Infosys, RoboSoft, TCS,


what is virtual function in c++

6 Answers  


what are the realtime excercises in C++?

0 Answers   IBM, Wipro,


What is virtual destructor? Why?

3 Answers   Agile Software, College School Exams Tests, CSC,


Which language is not a true object oriented programming language?

0 Answers  


Categories