Which of the following is used to hide the internal implementation details of an object in C++?

Options

  • A. Abstraction
  • B. Inheritance
  • C. Recursion
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. Abstraction

Detailed Explanation

Answer: Abstraction

Abstraction focuses on showing the essential features of an object while hiding unnecessary implementation details.

For example, a user can call a function without needing to know all the internal code used to implement that function.