57 57 votes An Abstract Data Type (ADT) is: same as an abstract class a data type that cannot be instantiated a data type for which only the operations defined on it can be used, but none else all of the above Data Structures gatecse-2005 data-structures normal abstract-data-type + – Kathleen 27.8k views answer comment Share Follow Print See all 6 Comments 6 6 Comments reply Show 3 previous comments Teet Makor commented Oct 18, 2024 reply Follow flag https://www.youtube.com/watch?v=g1USSZVWDsY&list=PLBF3763AF2E1C572F&index=2 ADT time stamp is already Given 2 2 replyShare Saquib001 commented Nov 23, 2025 reply Follow flag @1:40 0 0 replyShare om_30 commented Sep 3 reply Follow flag An Abstract Data Type (ADT) is a high-level conceptual model in computer science that defines a data type purely by its behavior and operations, rather than how it is built under the hood.When we talk about an ADT, we only care about what the data type does, not how it does it. This is known as data abstraction.An ADT acts as a contract. It tells the programmer: "If you use me, I promise to provide these specific operations, and they will behave in this exact way."Correct Answer C. a data type for which only the operations defined on it can be used, but none elseThis is the definition of encapsulation and abstraction inherent to ADTs. Because an ADT is defined strictly by its interface, a user is restricted to using only the explicit operations provided by that ADT.A Classical Example: The Stack ADTA Stack is a "Last-In, First-Out" (LIFO) structure. The Stack ADT defines only a few standard operations:push(item): Add an item to the top.pop(): Remove and return the top item.peek(): Look at the top item without removing it.Because of this definition, you cannot access an element in the middle of a Stack directly. You cannot sort it in place using random index access like an array. You are strictly limited to push, pop, and peek. If you need to do other things, a Stack is the wrong ADT for your problem.Why Option A is Wrong ("same as an abstract class")Abstract Data Type (ADT) is a conceptual design tool in computer science theory. It exists independently of any programming language. You can describe a Stack ADT using plain English or math formulas.Abstract Class is a language-specific feature (found in OOP languages like Java, C++, or Python). It is a structural tool used to achieve polymorphism and code reuse through inheritance.While you can use an abstract class to help define an ADT in Java, they are not the same thing. An ADT is the idea; an abstract class is one way to start writing code for that idea.Why Option B is Wrong ("a data type that cannot be instantiated")This option confuses ADTs with abstract classes or interfaces in coding.In a program, you absolutely can instantiate and use an ADT, provided you have written a concrete implementation for it. For example, if you implement the Queue ADT using a Linked List implementation, you can safely create an instance of that queue (Queue myQueue = new LinkedListQueue();) and start using it to store data.Why Option D is Wrong ("all of the above")Since A and B are conceptually incorrect, D is eliminated. 0 0 replyShare Please log in or register to add a comment.
Best answer 75 75 votes An abstract data type (ADT) supports only the operations which are defined. Abstract class is one that may not have definitions of all the objects it have. Moreover it can not be instantiated. To instantiate we have to create a subclass then instantiate the class. Abstract Data Type is like data structure eg. $STACK$ where we have $PUSH()$ $POP()$ operation defined . Hence, they are not the same thing. http://www.devx.com/tips/Tip/5681 Correct Answer: $C$ Manali Sikdar answered Dec 22, 2014 • edited Apr 30, 2019 by Naveen Kumar 3 Manali Sikdar comment Share Follow See all 8 Comments 8 8 Comments reply Show 5 previous comments Venky8 commented Oct 14, 2022 reply Follow flag Mods update link in answer to: https://web.archive.org/web/20210323182511/https://www.devx.com/tips/Tip/5681 1 1 replyShare Abhrajyoti00 commented Oct 28, 2022 reply Follow flag Is structure an abstract datatype? @Pranavpurkar 0 0 replyShare ImPranav commented Feb 20, 2023 reply Follow flag @Abhrajyoti00 Basically, structures (along with class) are used to write the attributes and functions of an Abstract Data Type. 1 1 replyShare Please log in or register to add a comment.
14 14 votes ADT of any data structure is "what operation stacks you can perform on this data structure." for ex: ADT of stack: (1) push() (2) pop() ADT of queue: (1) enqueue (2) dequeue rajoramanoj answered Aug 26, 2017 rajoramanoj comment Share Follow See all 3 Comments 3 3 Comments reply vps123 commented Oct 29, 2019 reply Follow flag why not option b?? 3 3 replyShare akshay7797 commented Mar 22, 2020 reply Follow flag are stack and queue themselves ADT or are the operations performed on stack and queue called ADT? 0 0 replyShare Thadymademe commented Sep 9, 2023 reply Follow flag @akshay7797 stacks , queues , linked lists , trees etc are ADT’s . 0 0 replyShare Please log in or register to add a comment.
6 6 votes See link: https://www.devx.com/tips/Tip/5681 An abstract class is a class that has at least one pure virtual member function. It is not a data type (normally, abstract classes do not contain any data members), nor can you instantiate an object thereof. An abstract class is merely a skeletal interface, which specifies a set of services that its subclasses implement. This clears why option a) is incorrect. An abstract data type (also called a concrete type) is a self-contained, user-defined type that bundles data with a set of related operations. It behaves in the same way as a built-in type does. However, it does not inherit from other classes, nor does it serve as the base for other derived classes. Some examples of abstract data types or concrete types include std::string, std::complex, and std::vector. We can instantiate abstract data type or concrete type as all operations are defined on it. For example, in C++ you can instantiate the abstract data type string by: std::string mystring = “Hello World”; So option B) is false. Also see: https://wikipedia.org/wiki/Abstract_data_type In computer science, an abstract data type (ADT) is a mathematical model for data types. An abstract data type is defined by its behavior (semantics) from the point of view of a user, of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations. So option c) is correct. Venky8 answered Nov 28, 2020 • edited Sep 18, 2021 by Venky8 Venky8 comment Share Follow See all 2 Comments 2 2 Comments reply ajayraho commented Dec 26, 2023 reply Follow flag This should be the best answer 1 1 replyShare Teet Makor commented Oct 18, 2024 reply Follow flag make this the best answer, as there is only 1 question on the ADT topic and the given answer is not the best to explain 0 0 replyShare Please log in or register to add a comment.
3 3 votes Correct answer will be C) A data type for which only the operation defined on it can be used but none else. Stack is Abstract Data Type, We can not perform any other operation on stack other that push() and pop() operation. rude answered Jun 8, 2016 rude comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes See http://en.wikipedia.org/wiki/Abstract_data_type Ekta07_GATE answered Sep 22, 2019 Ekta07_GATE comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Option B is false. Some algorithms need to create new instances of some ADT (such as new variables, or new stacks). To describe such algorithms, one usually includes in the ADT definition a create() operation that yields an instance of the ADT, usually with axioms equivalent to the result of create() is distinct from any instance in use by the algorithm. This axiom may be strengthened to exclude also partial aliasing with other instances. On the other hand, this axiom still allows implementations of create() to yield a previously created instance that has become inaccessible to the program. https://en.wikipedia.org/wiki/Abstract_data_type Shakyaji answered Dec 23, 2021 Shakyaji comment Share Follow 0 reply Please log in or register to add a comment.