Array-
An array is defined as a set of finite number of homogeneous elements or data items.
It means on array can contain one type data only, either all integer all following point number all character, declaration of array is as follows-
int a[6]
where int specified the data types or type of element array shows-
A 'a' is the name of Array and the number specified inside the bracket is the number of element an array can store.
Following a some of the concept to be remember about array -
The number of element that can be in an array that is the size of an array its name is given by the following equation.
[(upper bound - lower bound) + 1]
Array can always be read or written through loop -
a) for reading an array
for(i=0; i<=9; i++0
{ scanf( "%d" , &a[i]); }
b) for writing an array
for (i=0; i,=9; i++)
{ printf("%d" , a[i]); }
List -
A list (Linear Linked List) can be defined as a collection of a variable name of data item. An element of list must contain at least two field, one for sorting data or information and other for sorting address of next element.
LIST is divided into two parts-
A) Linear List.
B) Linear List.
A) Linear list is divided into two parts -
1. STACK
2. QUEUE
B) Non Linear list is divided into two parts.
1. Graph
2. Tree.
STACK -
A stack has a special feature that deletion and insertion of element can be done only from one end, called the top of stack due to this property it is also called as last in first out(LIFO). Type of data structure.
Queue
Queue are FIFO type of data structure. In a queue new element are added to the queue from one end called. Rear and the element are always remove from other end called the Front end.
TREE -
A tree can be define as finite set of data items(nodes). Tree is non linear type of data structure in which data items are arrange or stored in a sorttest sequence. Tree represents the hierarchical relationship between various element.
GRAPH
A graph (VE) is set of vertice(V) and set of edges (E).
Comments
Post a Comment