In C++, _______ is used to restrict access to class members and maintain encapsulation.
- public
- protected
- private
- global
The "private" access specifier in C++ restricts access to class members, ensuring they can't be accessed or modified outside the class, thereby maintaining encapsulation and data integrity within the class.
Loading...
Related Quiz
- Which operator will give the remainder of a division operation?
- Your team is developing a C++ application involving several classes with complex interrelationships and data handling. How can abstraction be effectively implemented to simplify the interactions between different class objects and the user?
- In C++11 and later, the keyword _______ can be used in a range-based for loop to avoid copying elements.
- The standard namespace used commonly in C++ is _______.
- What will be the result of the bitwise OR operation between 1101 and 1010 binary numbers?