What is Data Structure ?
- Data structures are used to store data in a computer in an organized form. In C language Different types of data structures are; Array, Stack, Queue, Linked List, Tree.
Array
- An Array is a collection of similar data type value in a single variable.
- An array is a derived data type in C, which is constructed from fundamental data type of C language.
![Array](https://cdn.wikitechy.com/interview-questions/data-structure/array-in-data-structure.png)
Stack
- Stack is linear data structure.
- In stack addition of new data item and deletion of already existing data item is done from only one end, known as top.
- Working of stack on the basis of Last-in-First-out (LIFO) principal, it means last entered item remove first.
![Stack](https://cdn.wikitechy.com/interview-questions/data-structure/stack-in-data-structure.png)
Queue
- Queue is work on the principal of First-In-First-Out (FIFO), it means first entered item remove first.
- Queue have two end front and back, from front you can insert element and from back you can delete element.
![Queue](https://cdn.wikitechy.com/interview-questions/data-structure/queue-in-data-structure.png)
Linked List
- Linked list is a special type of data structure where all data elements are linked to one another.
- Linked list is the collection of nodes and every nodes contains two parts data part and address part.
![Linked List](https://cdn.wikitechy.com/interview-questions/data-structure/linked-list-in-data-structure.png)
Tree
- Stores data in a non linear form with one root node and sub nodes.
![Tree](https://cdn.wikitechy.com/interview-questions/data-structure/tree-in-data-structure.png)