Exam-style question
Try this first
Explain what data abstraction means. In your answer, describe how it applies to a stack that is implemented as an array and a pointer for the top of the stack.
Answer and explanation
Concise answer
Data abstraction is a methodology in which the details of how data is represented and constructed are hidden from the code that uses the data.
Why this is correct
A strong answer identifies both parts of the idea: the representation is hidden, and the way the object is used is separated from how it is constructed. The array and top-of-stack pointer provide the specified example of the hidden construction.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
