Data Abstraction MCQs: 12 Solved Questions on Hiding Implementation Details
Learn a three-part test for separating abstraction from encapsulation and information hiding, then apply it to 12 exact MCQs with worked explanations.
KnowledgeGate Team
Exam prep & CS education

Abstraction, encapsulation and information hiding often appear as near-synonyms, but spotting an OOP keyword is not enough to choose the right option. Use a three-part test: identify the functionality visible to the caller, identify the representation that remains hidden, and decide whether the stem asks about a simplified contract or restricted access to internal state. The 12 questions below are drawn from KnowledgeGate's question bank. Answer each item before reading its explanation, then use the same test to check your reasoning.
1. The visible contract and the hidden implementation

Data abstraction specifies useful operations and observable behaviour while leaving representation and algorithms behind an interface. A stack's visible contract is push(int), pop(), top() and isEmpty(). The caller knows what these operations do, not whether values occupy array slots or linked nodes.
Apply that contract to one sequence:
Call or state | Hidden array implementation | Hidden linked implementation |
|---|---|---|
Start empty |
|
|
|
|
|
|
|
|
|
|
|
| Unchanged | Unchanged |
Both representations return 9 from pop() and 4 from top(). The caller depends on those LIFO results, not on topIndex or head.
Abstraction says what the caller can do. Encapsulation groups state and behaviour within one boundary. Information hiding limits direct access to the representation. See the OOP four-pillars guide for the larger map and Coding & Skills for the broader route.

The set moves from logical view and essential features to encapsulation, information hiding and abstract data types.
2. Logical view, essential features and hiding: Questions 1-3
These questions move from the formal definition to common shorthand. Hiding means suppressing irrelevant implementation detail while preserving useful behaviour. It does not mean removing the implementation.
Q1
________ is the separation of the logical view of data from its implementation.
(a)
Control Structure(b)
Data Abstraction(c)
Testing(d)
Initialisation
(Exam attribution: RSSB, Informatic Assistant, 2023.)
Answer: (b) Data Abstraction. The logical view is push, pop and LIFO behaviour. Its implementation may be [4, 9, _] with topIndex = 1 or 9 -> 4 -> null. Testing can check either version, but it does not create the separation.
Q2
.......... refers to the procedure of representing essential features without including the background details.
(a)
Abstraction(b)
Encapsulation(c)
Inheritance(d)
Polymorphism
(Exam attribution: HTET, 2024.)
Answer: (a) Abstraction. The essential stack feature is LIFO: after push(4) and push(9), pop() returns 9. Slots, indexes and node links are background details.
Q3
Abstraction means:
(a)
Summarization(b)
Elimination(c)
Hiding(d)
Casting(e)
None of these
(Exam attribution: Bihar STET, 2019.)
Answer: (c) Hiding. This is the question's intended shorthand. Abstraction hides irrelevant implementation details while preserving the public contract. It does not eliminate implementation, while casting converts between types.
3. What the caller sees versus how it works: Questions 4-6
For each item, locate the visible functionality, the hidden detail and the distractor concept.
Q4
What is an abstraction in object-oriented programming?
(a)
Hiding the implementation(b)
Hiding the important data(c)
Hiding the implementation and showing only the features(d)
None of the above
(Exam attribution: UPLT, 2026.)
Answer: (c). Option (a) hides implementation but exposes no useful contract. Publishing push, pop, top and isEmpty completes the abstraction.
Q5: Necessary functionality and hidden details
Which OOP concept focuses on hiding internal implementation details and exposing only the necessary functionality to the user?
(a)
Inheritance(b)
Abstraction(c)
Encapsulation(d)
Polymorphism(e)
Overloading
(Exam attribution: IBPS, 2024.)
Answer: (b) Abstraction. Inheritance extends a type; polymorphism varies behaviour behind a common operation; overloading reuses a name for different parameters; encapsulation protects an object boundary. "Necessary functionality" versus "implementation details" identifies abstraction. The Java OOP worked-interview guide offers follow-up practice.
Q6: Essential features and reduced complexity
Which concept reduces complexity by exposing only essential features?
कौन-सा कॉन्सेप्ट केवल आवश्यक विशेषताओं (essential features) को दिखाकर जटिलता (complexity) को कम करता है?
(a)
Encapsulation/एनकैप्सुलेशन(b)
Abstraction/एब्स्ट्रैक्शन(c)
Inheritance/इनहेरिटेंस(d)
Polymorphism/पॉलीमॉर्फिज्म
(No exam or year is supplied for this item.)
Answer: (b) Abstraction. Calling withdraw(250) on balance 1000 yields 750. Hidden storage may use paise, 100000 - 25000 = 75000, or rupees, 1000.00 - 250.00 = 750.00.
4. Abstraction is not encapsulation: Questions 7-8
Q7
Abstraction and encapsulation are fundamental principles that underlie the object oriented approach to software development.
I. Abstraction allows us to focus on what something does without considering the complexities of how it works.
II. Encapsulation allows us to consider complex ideas while ignoring irrelevant detail that would confuse us.
(a)
Neither I nor II is correct.(b)
Both I and II are correct.(c)
Only II is correct.(d)
Only I is correct.
(Exam attribution: UGC NET, January 2017.)
Answer: (d) Only I is correct. Statement I describes abstraction. Statement II also describes ignoring irrelevant detail, which is abstraction again. Encapsulation instead packages an account's balance, deposit and withdraw inside one controlled boundary.
Q8: Data hiding and encapsulation
Data hiding is otherwise known as
(a)
Polymorphism(b)
Encapsulation(c)
Inheritance(d)
Abstraction
(Exam attribution: CDAC CCAT, 2019.)
Answer: (b) Encapsulation, under the question's intended terminology. Make balance private and permit 1000 -> 750 only through withdraw(250). This stem asks about restricting direct access, while abstraction exposes the operation. Use the Encapsulation MCQ collection for adjacent practice.
Idea | Fixed account example | Question answered |
|---|---|---|
Abstraction | From | What can the account do? |
Encapsulation | Keep | Which state and operations belong together? |
Data hiding | Outside code cannot write | Can outside code write balance directly? |
5. Information hiding and a flawed matching item: Questions 9-10
Q9
Which object-oriented design principle restricts outside code to a module’s published interface by hiding its internal representation?
(a)
Polymorphism(b)
Information hiding(c)
Encapsulation(d)
Abstraction
(Exam attribution: Bihar STET, 2023.)
Answer: (b) Information hiding. The decisive phrases are "restricts outside code" and "published interface". Abstraction chooses the essential view. Information hiding protects the representation, so an array-backed stack can later become linked without callers reading array slots or node pointers.
Q10
Match each OOP term in List I with the definition in List II.
List I: (a) Polymorphism; (b) Inheritance; (c) Encapsulation; (d) Abstraction.
List II: (i) Picking both operator and attributes with operations appropriate to model an object; (ii) Hiding implementation details of methods from users of objects; (iii) Using similar operations to do similar things; (iv) Creating new classes from an existing class.
Codes:
(a)
(a)-(iv), (b)-(iii), (c)-(i), (d)-(ii)(b)
(a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)(c)
(a)-(iii), (b)-(i), (c)-(ii), (d)-(iv)(d)
(a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)
(Exam attribution: UGC NET, December 2015.)
Flawed-option audit: KnowledgeGate's answer key lists (b), but its explanation states that no displayed option matches all four definitions. The conceptually correct mapping is (a)-(iii), (b)-(iv), (c)-(ii), (d)-(i).
Check each pair. Polymorphism uses area() for different shapes, so (a)-(iii). Inheritance creates a class from an existing class, so (b)-(iv). Encapsulation hides implementation details, so (c)-(ii). Abstraction selects relevant attributes and operations, so (d)-(i). Option (b) swaps the last two.
6. Core OOP features and abstract data types: Questions 11-12
Abstraction is central to OOP, but it also specifies abstract data types independently of any one object-oriented language.
Q11
Which one of the following are essential features of object oriented language?
A. Abstraction and encapsulation
B. Strictly typed
C. Type safe property coupled with subtype rule
D. Polymorphism in the presence of inheritance
(a)
A and B only(b)
A, D and B only(c)
A and D only(d)
A, C and D only
(Exam attribution: Indian Space Research Organization, December 2017.)
Answer: (c) A and D only. Abstraction and encapsulation are core OOP features, while polymorphism with inheritance enables subtype behaviour. Strict typing and a particular type-safe subtype rule belong to some type systems, not every language capable of object-oriented programming.
Q12
The data type created by the data abstraction process is called
(a)
class(b)
structure(c)
abstract data type(d)
user defined data type
(Exam attribution: UGC NET, Paper 2, 2010.)
Answer: (c) abstract data type. A queue ADT specifies enqueue, dequeue, front and FIFO order. Start empty. enqueue(7) gives [7]; enqueue(2) gives [7, 2]; dequeue() returns 7; front() then returns 2. An array may move frontIndex from 0 to 1, while a linked implementation moves head from node 7 to node 2. Both produce the same visible result. A class or structure can implement the ADT, while "user defined" describes authorship rather than representation independence.
7. Answer grid, error audit and next practice step
The compact key is: 1-B, 2-A, 3-C, 4-C, 5-B, 6-B, 7-D, 8-B, 9-B, 10-no displayed option matches; conceptual mapping (a)-(iii), (b)-(iv), (c)-(ii), (d)-(i), 11-C, 12-C.
For future MCQs, run a three-question audit. Does the stem stress essential operations rather than implementation? Choose abstraction. Does it stress restricted access to state? Choose data or information hiding through an encapsulated boundary. Does it ask for a representation-independent data-type specification? Choose an ADT.
Study the implementation side in the C++ Programming Course: Concepts, MCQs and Coding, then answer Questions 7, 9 and 10 without the key. Explain why Question 10 has no correct displayed option to confirm concept-level reasoning.
Keep learning
Data Abstraction Explained: Hide Implementation Details with a Worked Java Example
See how a stable Account contract protects its invariant while the Java implementation changes from a running balance to a transaction ledger.
Abstraction, Modularity and Information Hiding MCQs: 12 Solved Design Questions
Use 12 solved design-concept MCQs to separate abstraction, ownership, refinement, CRC roles and UML modelling choices.
Abstraction and Interfaces in Java: Abstract Classes, Contracts and Runnable Examples
Learn when Java needs an abstract class, when it needs an interface, and how both work together in one runnable charge-calculation program with exact outputs.
OOPs Concepts in Java: Inheritance, Polymorphism, Abstraction and Encapsulation with Worked Interview Questions
Turn the four OOP pillars into predictable Java behaviour. Trace superclass references, subclass objects, overridden methods, hidden fields and common follow-ups.





