Computer Science, asked by jububhuyan743, 4 months ago

Different between data structure and data type​

Answers

Answered by Anonymous
5

For example an integer data type describes every integer that the computers can handle. ... On other hand Data structure is the collection that holds data which can be manipulated and used in programming so that operations and algorithms can be more easily applied.

Answered by tanishkavadwala25
2
Data Type :

A data type is the most basic and the most common classification of data. It is this through which the compiler gets to know the form or the type of information that will be used throughout the code.
Eg :

#include

using namespace std;



void main()
{

int a;

a = 5;

}
Data Structure:

A data structure is a collection of different forms and different types of data that has a set of specific operations that can be performed. It is a collection of data types. It is a way of organizing the items in terms of memory, and also the way of accessing each item through some defined logic. Linked list ,stack, queues etc are a part of Data Structure.

Eg :

you have to store data for many employees where each employee has his name, employee id and a mobile number. So this kind of data requires complex data management, which means it requires data structure comprised of multiple primitive data types
Similar questions