Open In App

GATE | GATE-CS-2005 | Question 2

Like Article
Like
Save
Share
Report

An Abstract Data Type (ADT) is:

(A)

Same as an abstract class

(B)

A data type that cannot be instantiated

(C)

A data type for which only the operations defined on it can be used, but none else

(D)

All of the above



Answer: (C)

Explanation:

Explanation:

The correct answer is (C) A data type for which only the operations defined on it can be used, but none else.

An Abstract Data Type (ADT) is a high-level description of a data type that defines a set of operations on the data and their behavior, without specifying the implementation details. It provides an abstraction and encapsulation of the data, allowing users to interact with the data through a defined set of operations.

Option (A) “Same as an abstract class” is not correct. While abstract classes in object-oriented programming languages can be used to define ADTs, not all ADTs are implemented using abstract classes. ADTs can be implemented in various ways, including using interfaces, data structures, or other language constructs.

Option (B) “A data type that cannot be instantiated” is also not entirely accurate. ADTs can be instantiated or used to create objects, but they typically restrict the direct access to the underlying data and enforce the use of operations defined on the ADT to manipulate and interact with the data. The key point is that an ADT provides a well-defined interface and hides the internal representation and implementation details.

Therefore, the correct answer is (C) A data type for which only the operations defined on it can be used, but none else.

Quiz of this Question
 


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads