Examveda

What is the process of hiding the implementation details of a class and showing only the necessary features to the outside world called in C++?

A. Abstraction

B. Polymorphism

C. Encapsulation

D. Inheritance

Answer: Option A

Solution (By Examveda Team)

Abstraction in C++ refers to the process of hiding the implementation details of a class and exposing only the essential features to the outside world.

It allows the user to interact with an object without knowing the internal complexity, making the code cleaner, modular, and easier to maintain.

Why other options are incorrect:

Polymorphism deals with using the same function or operator in different ways.

Encapsulation is about wrapping data and functions together into a single unit (class).

Inheritance allows one class to acquire the properties of another.

Therefore, the correct answer is Abstraction.

Join The Discussion

Comments (1)

  1. Sanket Shingade
    Sanket Shingade:
    2 weeks ago

    I thought its answer might be Abstraction.

Related Questions on Constructors and Destructors in C plus plus