Skip to content

AswinBarath/Data-Structures-using-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Data Structures using C

Lab Coverage Beginner Friendly Open Source

A Theoretical Repobook for Understanding core concepts of Data Structures using C Programming Language


About This Repository

Backstory:

  • Data Structures using C is one of the Core Computer Science Course which was part of my Software Engineering Degree in 3rd Semester, Sophomore Year
  • New to C Programming? Check out my GitHub Repository on C-Programming-for-Engineers, the predecessor to this repository ⬇

Vision:

This repository is designed to be the ultimate, all-in-one resource for mastering Data Structures using C. It combines:

  • Comprehensive theory notes and curriculum
  • Complete, well-documented lab programs in C
  • Real university assignments, question banks, and lab manuals
  • Cross-linked resources for both quick reference and deep study

Whether you are a student, self-learner, or educator, this repo aims to make learning and teaching Data Structures in C practical, accessible, and exam-ready.

Key Features:

  • 100% coverage of typical university curriculum and labs
  • Direct mapping from theory to code and notes
  • All files and resources organized, linked, and easy to navigate
  • Suitable for both beginners and advanced learners

How to Use This Repo

  • Students:

  • Self-learners:

    • Follow the curriculum table for a structured learning path.
    • Use the code and notes side-by-side for hands-on understanding.
    • Explore additional resources in the Notes and Lab Notes sections.
  • Educators:

    • Use the tables and mappings to quickly find teaching materials, lab programs, and reference notes.
    • Share direct links to code, notes, or curriculum sections with your students.

Tip: Use the Table of Contents below to jump to any section instantly!


Table of Contents

The Curriculum

Topic Details
Unit I: Introduction Data Structures
Classifications (Primitive & Non Primitive)
Data structure Operations
Review of Arrays
Structures, Self-Referential Structures, and Unions
Unit I: Pointers and Dynamic Memory Allocation Functions Representation of Linear Arrays in Memory
Dynamically allocated arrays
Multidimensional Arrays
Polynomials and Sparse Matrices
Unit I: Strings Basic Terminology
Storing
Operations and Pattern Matching algorithms
Unit I: Sorting and Searching Insertion Sort
Radix sort
Address Calculation C Programming Examples Sort
Unit II: Stacks and Queues Definition
Stack Operations
Array Representation of Stacks
Stacks using Dynamic Arrays
Unit II: Stack Applications Polish notation
Infix to postfix conversion
Evaluation of postfix expression
Unit II: Recursion Factorial
GCD
Fibonacci Sequence
Tower of Hanoi
Ackerman's function
Unit II: Queues Definition
Array Representation
Queue Operations
Circular Queues
Circular queues using Dynamic arrays
Dequeues
Priority Queues
A Mazing Problem
Unit III: Linked Lists Definition
Representation of linked lists in Memory
Memory allocation
Garbage Collection
Linked list operations: Traversing, Searching, Insertion, and Deletion
Doubly Linked lists
Circular linked lists
Header linked lists
Linked Stacks and Queues
Applications of Linked lists – Polynomials, Sparse matrix representation
Unit III: Hashing Hash Table organizations
Hashing Functions
Static and Dynamic Hashing
Unit IV: Trees Terminology
Binary Trees
Properties of Binary trees
Array and linked Representation of Binary Trees
Binary Tree Traversals: Inorder, Postorder, Preorder
Additional Binary tree operations
Threaded binary trees
Binary Search Trees – Definition, Insertion, Deletion, Traversal, Searching
Application of Trees-Evaluation of Expression
Unit V: Graphs Definitions
Terminologies
Types of Graphs
Matrix and Adjacency List Representation Of Graphs
Elementary Graph operations
Unit V: Minimal Spanning Tree Prim's algorithm
Kruskal's Algorithm
Unit V: Traversal methods Breadth First Search
Depth First Search
Unit V: Applications of Graph Applications of Graph
Unit V: Files and Their Organization Data Hierarchy
File Attributes
Text Files and Binary Files
Basic File Operations
File Organizations and Indexing

πŸ“š See also: Curriculum to Notes Mapping (Unified Table) for direct links to notes and resources for each topic.


Data Structures using C Lab Programs

Lab 1: Demonstrating Pointers Usage

  1. Printing Memory Addresses: Write C program to demonstrate the use of pointers by printing memory address
  2. Writing a Swap Function: Write a C program to swap two numbers using pointers concept
  3. Allocating and Freeing Memory: Write a C program to demonstrate the use of allocating a memory and freeing
  4. Memory Leaks and Other Problems: Write a C program to demonstrate the memory leaks when pointers are not used properly.

Lab 2: Demonstrate Strings, User defined data types and Files in C

  1. Reading and Writing Strings: Write a C program to demonstrate the input and output operations on strings
  2. String operations / Manipulations: Write a C program to demonstrate the operations on strings – by writing user defined string functions.
  3. Enumerations, Structures and Union: Write a C program to demonstrate Enumerations, Structures and Union data types. Write a program for following using recursive methods.
  4. File operations: Write a C program to demonstrate the input and output operations on files

Lab 3: Demonstrate the technique of recursion in C

  1. Recursion – Write recursive function for i) Sum of natural numbers ii) Factorial of a given number iii) Fibonacci sequence

Lab 4: Stack ADT Implement Stack using Arrays

Lab 5: Queue ADT Implement Queue using Arrays

Lab 6: Singly Linked List Write a C Program to perform following operations on Singly Linked List ADT: i. Create ii. Insert iii. Delete iv. Display

Lab 7: Doubly Linked List Write a C Program to perform following operations on Doubly Linked List ADT: i. Create ii. Insert iii. Delete iv. Display

Lab 8: Circular Linked List Write a C Program to perform following operations on Circular Linked List ADT: i. Create ii. Insert iii. Delete iv. Display

Lab 9: Implement Stack using List

Lab 10: Implement Queue using List

Lab 11: Implement Binary Search Tree – using List

Lab 12: i) Implement a Simple Heap ii) Implement Priority Queue using Heap

πŸ’» See also: Lab Program Aims to Code Mapping for direct links to C code for each lab aim.


Table of Contents

Data Structures using C Lab

Lab 1 - Pointers

Lab 2 - Strings and User Defined Data Types

Lab 3 - Recursion

Lab 4 - Stack ADT

Lab 5 - Queue ADT

Lab 6 - Singly Linked list ADT

Lab 7 - Doubly Linked list ADT

Lab 8 - Circular Linked list ADT

Lab 9 - Implement Stack using List

Lab 10 - Implement Queue using List

Lab 11 - Implement Binary Search Tree using List

Lab 12 a - Implement a Simple Heap

Lab 12 b - Implement Priority Queue using Heap

Data Structures using C Notes

πŸ“ See also: Curriculum to Notes Mapping (Unified Table) for a topic-wise mapping to notes and resources.

Data Structures using C Syllabus

Data Structures using C Question Bank

Data Structures using C Assignments

Data Structures using C Internals

Data Structures using C Lab Notes

LICENSE


Curriculum to Notes Mapping (Unified Table)

This table maps each curriculum topic and subtopic from the README to the most relevant notes, PDFs, or documents in this repository. Each topic is linked to the best available resource(s) for easy reference.

Topic Resource
Unit I
Introduction
Data Structures, Classifications, Operations 1.Unit_1-Introduction.pdf β€” Overview
Structures, Self-Referential Structures, Unions I Structures Notes.docx β€” Details
I Self Referential Structures.pdf
Comprehensive Notes I Notes.pdf
Pointers and Dynamic Memory Allocation
Pointers, Dynamic Memory, Arrays 2.Unit_1-Pointers _ Dynamic memory alloction.pdf
Additional Notes I_II Missing Concepts.pdf
Strings
Pattern Matching, String Operations 3.Unit_1-Pattern Matching Algorithms.pdf
In-depth Pattern Matching PatternMatching.pdf
Sorting and Searching
Searching and Sorting Algorithms 4.Unit_1-Searching _ Sorting.pdf
Radix Sort 5.Radix Sort.pdf
Reference Algorithms 2.Intoduction to Algorithm - Cormen.pdf
Unit II
Stacks and Queues
Stack Operations, Array/Dynamic Representation 6.Unit_2-Stacks.pdf
Stacks, Queues, Applications II Stacks and Queues Notes.pdf
Queue Operations and Types 8.Queue.pdf
Stack Applications
Polish Notation, Infix/Postfix, Evaluation 6.Unit_2-Stacks.pdf
Recursion
Recursion, Classic Problems 7.Unit_2-Recurssion.pdf
Queues (continued)
Circular Queues, Dequeue, Priority Queues, Mazing Problem 8.Queue.pdf
Unit III
Linked Lists
Linked List Types, Operations, Memory Management III Notes Linked Lists.pdf
Additional Notes I_II Missing Concepts.pdf
Doubly, Circular, and Header Linked Lists
All Types III Notes Linked Lists.pdf
Linked Stacks and Queues, Applications
Applications III Notes Linked Lists.pdf
Hashing
Hash Tables, Functions, Static/Dynamic Hashing III Hashing.pdf
Unit IV
Trees
Binary Trees, Properties, Traversals, Operations IV Notes Tree.pdf
Tree Algorithms and Applications IV Agorithms.pdf
Binary Search Trees, Threaded Trees, Expression Evaluation
BST, Threaded Trees, Expression Evaluation IV Notes Tree.pdf
Unit V
Graphs
Graph Definitions, Types, Representations, Operations V 1.Notes_1.pdf
Additional Graph Notes V 1.Notes_2.docx
Minimal Spanning Tree, Traversal Methods, Applications
MST, Traversal, Applications V 1.Notes_1.pdf
Files and Their Organization
File Organization and Operations I Notes.pdf
Syllabus, Question Banks, Assignments, and Internals
Syllabus
Official Syllabus Data Structures Using C Theory & Lab Syllabus.pdf
Question Banks
Units I & II I_II QB.pdf
Units III & IV III, IV QB_LINKEDLISTS_TREES.pdf
Assignments
Sample Assignment 5.I Assignment.docx
Internal Assessment Solutions
IA-I Solution 1 0.IA-I Soln_1.docx
IA-I Solution 2 0.IA-I Soln_2.docx
IA-II Solution 0.IA-II Soln.docx
IA-III Solution 0.IA-III Soln.docx

For more detailed lab experiment notes, see the Data Structures using C Lab Notes folder.


Lab Program Aims to Code Mapping

This table maps each lab program aim from the curriculum to the corresponding C code file(s) in this repository. Each code file is linked for easy access.

Lab Aim Code File(s)
Lab 1: Demonstrating Pointers Usage
Printing Memory Addresses PointersMemoryAddresses.c
Writing a Swap Function PointersSwap.c
Allocating and Freeing Memory PointersAllocationFreeing.c
Memory Leaks and Other Problems PointersMemoryLeaks.c
Lab 2: Strings, User Defined Data Types, and Files
Reading and Writing Strings StringOperationsLibraryFunctions.c
String Operations / Manipulations (User Defined) StringOperationsUserDefinedFunctions.c
Enumerations, Structures UsingStructure.c
Union Data Types UsingUnion.c
File Operations FileOperations.c
Lab 3: Recursion
Recursion (Sum, Factorial, Fibonacci, etc.) RecursiveFunstionsOfClassicProblems.c
Lab 4: Stack ADT (Arrays)
Stack Operations using Arrays StackADT.c
Lab 5: Queue ADT (Arrays)
Queue Operations using Arrays QueueADT.c
Lab 6: Singly Linked List ADT
Create, Insert, Delete, Display (Singly Linked List) SinglyLinkedListADT.c
Lab 7: Doubly Linked List ADT
Create, Insert, Delete, Display (Doubly Linked List) DoublyLinkedListADT.c
Lab 8: Circular Linked List ADT
Create, Insert, Delete, Display (Circular Linked List) CircularLinkedListADT.c
Lab 9: Implement Stack using List
Stack using Linked List StackUsingList .c
Lab 10: Implement Queue using List
Queue using Linked List QueueUsingList.c
Lab 11: Implement Binary Search Tree using List
Binary Search Tree using List BinarySearchTreeUsingList.c
Lab 12a: Implement a Simple Heap
Simple Heap SimpleHeap.c
Lab 12b: Implement Priority Queue using Heap
Priority Queue using Heap PriorityQueueUsingHeap.c

How to Contribute

We welcome contributions to make this resource even better!

  • Add or improve C code: Submit new lab programs, optimize existing code, or add comments for clarity.
  • Expand notes: Add new notes, summaries, or explanations for any topic.
  • Fix errors: Spot a typo, bug, or outdated info? Open an issue or submit a pull request.
  • Suggest resources: Recommend books, online courses, or tools for the community.

Steps to contribute:

  1. Fork this repository
  2. Create a new branch for your changes
  3. Make your edits and commit
  4. Open a pull request with a clear description

For major changes, please open an issue first to discuss what you would like to change.


Related Resources


FAQ / Troubleshooting

Q: How do I compile and run the C programs? A: Use a C compiler like GCC. Example: gcc filename.c -o output && ./output

Q: Can I use these notes and code for my university assignments? A: Yes! This repo is designed for learning and academic use. Please cite or reference if required by your institution.

Q: I found a mistake or have a suggestion. What should I do? A: Open an issue or submit a pull request. See How to Contribute.

Q: Are there solutions to all lab programs? A: Yes, all standard lab programs are covered with code and notes.


Changelog / Version History

Version Date Commit Changes
v3.0 Jun 21, 2025 Major README overhaul, curriculum/code/notes mapping, TOC, contribution guide, added unified tables, improved linking
v2.0 Jan 8, 2022 Resource Addition: DS using C Lab & Notes & Documentation Update
v1.0 Dec 29, 2021 Initial compilation of notes and code

About

A Theoretical Repobook for Understanding core concepts of Data Structures using C Programming Language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages