Searching for "specifiers"

Q:

Different access specifiers for the class member in C++

Answer

Access specifiers in C++ determines the scope of the class members.


Public: If a class member is public, it can be used anywhere without the access restrictions.


Private: if a class member is private, it can be used only by the members and friends of class.


Protected: If a class member is protected, it can be used only by the members and friends of class and the members and friends of classes derived from class.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

Q:

Which among the following are not access Specifiers in C++?

A) Public B) Protected
C) Default D) Private
 
Answer & Explanation Answer: C) Default

Explanation:

Default is the access specifier in java not in C++

Report Error

View Answer Report Error Discuss

Filed Under: C++