In C++, it’s not necessary to use classes, and hence codes can be written without using OOP concept. Classes may or may not contain member functions, so it’s not a necessary condition in C++. And, an object can only be declared in a code if its class is defined/included via header file.
Encapsulation and Abstraction are similar features. Encapsulation is actually binding all the properties in a single class or we can say hiding all the features of object inside a class. And Abstraction is hiding unwanted data (for user) and showing only the data required by the user of program.
The private members can’t be accessed by public members of the class
The private members can be accessed by public members of the class
The private members can be accessed only by the private members of the class
The private members can’t be accessed by the protected members of the class
Answer: Option B
The private members are accessible within the class. There is no restriction on use of private members by public or protected members. All the members can access the private member functions of the class.