You are on page 1of 6

Data Structure By Sanjay Manvatkar 1

Data Structures in C
Data structures in C are used to store data in an organized and efficient manner. Data

structures are an important aspect of C programs because they provide an efficient way to

access or manipulate data in programs that need to process data frequently. Data structures

can be divided into two main types: linear data structures and non-linear data structures.

Common examples of linear data structures are arrays, queues, stacks, and linked lists.

Graphs and trees are examples of nonlinear data structures.

The following section covers C programs on data structure topics such as arrays, linked lists,

singly and doubly linked lists, stacks, queues, binary trees, binary search trees, heap, hashing,

and, graphs. The most common operations that can be performed on data structures include

searching, sorting, inserting, updating, and deletion. These C examples cover a wide range of

programming areas in Computer Science. Every example program includes program

description, C code, and program output. All examples have been compiled and tested on

Windows and Linux systems.

Here is the listing of Data Structure Topics in C:

 C Programs on Array

 C Programs on Linked List

 C Programs on Singly Linked List

 C Programs on Doubly Linked List

 C Programs on Stack

 C Programs on Queue

 C Programs on Tree

 C Programs on Binary Tree


Data Structure By Sanjay Manvatkar 2

 C Programs on Binary Search Tree

 C Programs on Heap

 C Programs on Hashing

 C Programs on Graph

 C Programs on Matrix

 C Programs on Searching

 C Programs on Sorting

 C Programs on Data Structure Misc

C Programs on Linked List

 C Program to Implement Adjacency List

 C Program to Implement Skip List

 C Program to Implement Vlist

 C Program to Check if Two Lists are Equal

 C Program to Search an Element in a Linked List

 C Program to Find Intersection and Union of Two Linked Lists

 C Program to Swap Two Elements of the List without Key Field

More C Programs on Linked List

C Programs on Singly Linked List

 C Program to Perform Singly Linked List Operations

 C Program to Demonstrate Circular Single Linked List

 C Program to Check if Singly Linked List is Palindrome

 C Program to Convert Singly Linked List to Circular List

 C Program to Implement Singly Linked List using Dynamic Memory Allocation


Data Structure By Sanjay Manvatkar 3

C Programs on Doubly Linked List

 C Program to Convert Binary Tree to Singly Linked List

 C Program to Implement Circular Doubly Linked List

 C Program to Find the Largest Element in a Doubly Linked List

 C Program to Implement Doubly Linked List using Singly Linked List

C Programs on Stack

 C Program to Implement Stack

 C Program to Implement Stack using Two Queues

 C Program to Reverse a Stack using Recursion

 C Program to Reverse a Stack without Recursion

 C Program to Illustrate Stack Operations using MACROS

 C Program to Implement Stack Operations using Dynamic Memory Allocation

 C Program to Implement Two Stacks in a Single Array

 C Program to Check Expression is Correctly Parenthesized

 C Program to Solve Tower of Hanoi using Recursion

C Programs on Queue

 C Program to Implement Queue

 C Program to Implement Priority Queue Operations

 C Program to Implement Queue using Array

 C Program to Implement Queues using Stack

 C Program to Implement Queue using Two Stacks

 C Program to Implement Queue Functions using Arrays and Macros

 C Program to Implement Queue Functions using Dynamic Memory Allocation


Data Structure By Sanjay Manvatkar 4

C Programs on Tree

 C Program to Implement Segment Tree

 C Program to Implement Interval Tree

 C Program to Implement Range Tree

 C Program to Find the Sum of All Nodes in a Tree

 C Program to Print Left View of a Tree

 C Program to Find the Common Ancestor and Path

 C Program to Find the Nearest Common Ancestor

More C Programs on Tree

C Programs on Binary Tree

 C Program to Implement Splay Tree

 C Program to Implement Threaded Binary Tree

 C Program to Count the Number of Nodes in Binary Tree

 C Program to Create Mirror Image of Binary Tree

 C Program to Implement Double Order Traversal of a Binary Tree

More C Programs on Binary Tree

C Programs on Binary Search Tree

 C Program to Search an Element in a Tree

 C Program to Search an Element in a Tree Recursively

 C Program to Perform Left and Right Rotation on a Binary Search Tree

 C Program to Find the Lowest Common Ancestor of a Binary Search Tree

 C Program to Traverse the Tree using Recursion

More C Programs on Binary Search Tree


Data Structure By Sanjay Manvatkar 5

C Programs on Heap

 C Program to Implement Heap

 C Program to Implement Binary Heap

 C Program to Implement Binomial Heap

 C Program to Implement Binomial Heap Tree

 C Program to Implement a Heap and Perform Heap Operations

C Programs on Hashing

 C Program to Implement Hash Tables

 C Program to Implement Hash Tables with Double Hashing

 C Program to Implement Hash Tables Chaining with Linked Lists

 C Program to Implement Hash Tables Chaining with Doubly Linked Lists

 C Program to Implement Hash Tables Chaining with Binary Trees

 C Program to Implement Hash Tables with Linear Probing

 C Program to Implement Hash Tables with Quadratic Probing

C Programs on Graph

 C Program to Represent Graph Using Adjacency Matrix

 C Program to Represent Graph Using Incidence Matrix

 C Program to Represent Graph Using Adjacency List

 C Program to Represent Graph Using 2D Arrays

 C Program to Represent Graph Using Linked List

C Programs on Data Structure Misc

 C Program to Implement Vector


Data Structure By Sanjay Manvatkar 6

 C Program to Implement Trie

 C Program to Solve the Magic Squares Puzzle without Recursion

You might also like