C Programming language

adplus-dvertising
Classified data structure in C Language
Previous Home Next

The data structures mainly are classified in the following categories:

Primitive and Non-Primitive Data Structures

Primitive data: Primitive data structures are those data structures that can be directly operated upon the machine instructions. These data structures include int, char, float type of data structures.

Non-Primitive data: Non-Primitive data structures are those data structures that are derived directly from the primitive data structures. Examples of Non-Primitive data structures include class, structure, array, linked lists.

Homogeneous and Heterogeneous Data Structures

Homogeneous data: Homogeneous data structures are those data structures that contain only similar type of data e.g. like a data structure containing only integral values or float values. The simplest example of such type of data structures is an Array.

Heterogeneous Data: Heterogeneous Data Structures are those data structures that contains a variety or dissimilar type of data, for e.g. a data structure that can contain various data of different data types like integer, float and character. The examples of such data structures include structures, class etc.

Static and Dynamic Data Structures

Static data: Static data structures are those data structures to which the memory is assigned at the compile time, means the size of such data structures has to be predefined in the program and their memory can be increased or decreased during the execution. The simplest example of static data structure is an array.

Dynamic data: Dynamic Data Structures are those data structures to which memory  is assigned at the runtime or execution time and hence their size can be increased or decreased dynamically as per requirement of the program. The example of such data structures include class, linked lists etc.

Linear and Non-Linear Data Structures

Linear data: In linear data structures the data is kept in the sequential manner which means that the previous data has knowledge of next data or we can say that the data is interrelated. The example such data structures include arrays, linked lists etc.

Non-linear data: Non-linear data structures does not maintain any kind of relationship among the data. The data is stored in non-sequential manner and examples of these types of data structures includes graphs, trees etc.

Previous Home Next