1. Primitive data structure.
2. Non primitive data structure.
Further they are divided in to different categories
Primitive data structure: It's a basic data structure and it's directly operated upon the machine instructions. These structures have different representation on different computers.
Primitive data structure includes:
Integers, floating numbers, character constants, string constants, pointers etc.
INTEGERS:
The quantity representating objects that are discrete in nature can be represented by an integer.
For example: 2, 4, 6, 0, -23,-56 etc. are integers but 2.5, -34.56 are not integers.
FLOAT:
Float is a simple data type which takes 4 bytes in memory and we can assign decimal number in to it.
For example: 2.5, 245.67 etc.
CHRACTERS:
Characters are the literal representation of some elements selected from alphabets and characters are defined in the single quotes. There are wide varieties of character sets. Two widely used character sets are represented by
EDBIC and ASSII.
For example: '*', 'r', 'A', '2' etc. are constants.
POINTERS:
Pointers is a reference to the data structure and a simple type of variable which store the address of the another variable. Pointer is a single fixed size data item.
For example:
Int x;
Int *p;
P=&x;
Here x is the integer, where p is a pointer of integer type and pointer p points to x.
NON PRIMITIVE DATA STRUCTURE:
These are more sophisticated data structure and also these are derived from the primitive data structure. The non primitive data structure defines the group of homogenous and heterogeneous data items.
Array, List, Files are the examples of non primitive data structure.
ARRAY:
An array is a finite set of homogenous elements or data items. It means an array can contain one type of data, either all integers or characters.
Declaration of an array:we declare an array like int a[n].
Here 'a' be the name of an array and 'n' denotes the number of elements; an array can store this is called the length/size of an array and 'int' represents that this array contain only integer type of elements.
· The 1st element of an array has index zero.
· The element of an array will always be store in consecutive memory location.
· An array can always be read or write through loops.
· If we read one dimensional array; it requires only one loop and for two dimensional arrays; we require two loops and so on for n-dimensional array.
For reading an array:
for(i=0;i{
scanf("%d", &a[i]);
}
For writing an array:
for(i=0;i{
printf("%d", a[5]);
}
LIST:
List refers to as 'linear link list' and a list can be define as a collection of variables, or data items. Lists are most commonly used as non primitive data items. The element of list contains atleast two fields.
· One for storing the data items known as information field.
· Second for storing the address of next element known as pointer field.
For storing the address of the next element; we make the use of pointers and each data item is refer to as nodes. So we can also say that list is a finite collection of nodes.
Published by Harsh Gupta - Tech Writer
I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com View profile
Algebra Help: How to Solve Consecutive Integer Word ProblemsIn this article I discuss how to set up and solve word problems that ask you to find consecutive integers that match certain criteria. Included are four sample problems, two of...
An Introduction to Programming in PerlPerl is a versatile programming language created by Larry Wall in 1987. He designed this language to extract and manipulate text files. It has since grown into a rich programmin...- Data Structures: An Explanation of Data StructuresA basic explanation of various data structures involved in database construction.
- The Role of Data Mining Techniques and External Data in Enhancing Generalized Line...Section 83 of The Actuary's Free Study Guide for Exam 5 offers five practice questions and solutions regarding the role of data mining techniques and external data in enhancing generalized linear models (GLMs) in insu...
- A Crash Course in Medical Terminology - Understanding the Words of HealthcareUnderstanding the Words of Medical Terminology Helps you Make Sense Of Your Medical Records
- Data Structure
- JavaScript Multi-Dimensional Array
- JavaScript Two Dimensional Array
- Importance of Arrays in a Programming Language
- A Multidimensional Array for Horizontal Web Page Menus
- Tutorial - Declaring Array in JAVA
- Multidimensional Arrays in Perl 5.0: A Boon to Bioperl (Part 1)
- List refers to as 'linear link list' and a list can be define as a collection of variables, or data.
- An array is a finite set of homogenous elements or data items.


