loader image

Difference between data type and data structure

What is the difference between a data type and a data structure?

Data type and data structure sound like the same thing because they both deal with the nature and organisation of data, but one explains the kind and nature of data while the other represents the collections in which that data might be stored.

The following are the key distinctions between Data Type and Data Structure.

Data Type Data Structure
A data type represents the type of data that is going to be stored in a variable. It specifies that a variable will only assign values of a specific type. A data structure is a collection that holds various from of data.
It takes the form of abstract implementation whose definition is provided by different programming languages itself. Data structure is implemented in concrete implementation.
Datatypes are called dataless becuase it doesn’t store value of the data as it only represents the type of data that can be stored in a varibale. It can hold different types of data along with its value in a single object.
Variables can be explicitly assigned values. Some algorithms and operations like push, pop are used to assign values.
No problem of time complexity. Time complexity is there.
Eg: Integer, Character, Double etc. Eg: Linked List, Queue, Tre etc.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
Scroll to Top