How many types of access specifiers are provided in OOP (C++)?
Options
- A. 2
- B. 1
- C. 4
- D. 3
D. 3
In C++, there are 3 access specifiers:
public → Accessible from anywhere
private → Accessible only within the class
protected → Accessible within the class and derived classes
So, the total number of access specifiers in C++ is 3.
Attempt Quiz Now:
BPSC Tre 4.0 OOPS Concepts Practice Set