GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 2

Abstract data type interface

Data Structures · Other / Mixed Topics · Full GATE CSE 2005 paper

GATE 2005, Q2 1 mark · MCQ
Report issue

Other / Mixed Topics

Question 2, GATE 2005: An abstract data type is: A an abstract class; B a type that cannot be instantiated; C a type used through its defined operations rather than arbitrary representation operations; D all of these.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

An ADT specifies values and the operations permitted on them while hiding representation. Clients use its defined interface, C. It is not identical to an abstract class and does not imply that values/instances cannot be created.

An ADT defines permitted values and operations independently of how data is stored. A stack, for example, offers push/pop without letting clients depend on array indices or linked-node layout. It can have instances and can be implemented in many languages, including languages without classes. Thus C describes abstraction; A and B confuse separate language mechanisms with the abstract specification.

Original paper, page 1