VTU Developer

Your comprehensive resource for Data Structures Laboratory - BCSL305

Data Structures Laboratory

Complete Lab Programs & Resources

BCSL305
Subject Code
01
Credits
50
CIE Marks
50
SEE Marks
100
Total Marks
02
Exam Hours

Lab Programs

Complete collection of all 12 data structures lab programs with solutions and viva questions

Program 1

Dynamic Calendar Array

Develop a Program in C for the following: Declare a calendar as an array of 7 elements (A dynamically Created array) to represent 7 days of a week. Each Element of the array is a structure having three fields. The first field is the name of the Day (A dynamically allocated String), The second field is the date of the Day (A integer), the third field is the description of the activity for a particular day (A dynamically allocated String). Write functions create(), read() and display(); to create the calendar, to read the data from the keyboard and to print weeks activity details report on screen.

Program 2

String Pattern Matching

Develop a Program in C for the following operations on Strings. Read a main String (STR), a Pattern String (PAT) and a Replace String (REP). Perform Pattern Matching Operation: Find and Replace all occurrences of PAT in STR with REP if PAT exists in STR. Report suitable messages in case PAT does not exist in STR. Support the program with functions for each of the above operations. Don't use Built-in functions.

Program 3

Stack Operations & Palindrome

Develop a menu driven Program in C for the following operations on STACK of Integers (Array Implementation of Stack with maximum size MAX): Push an Element on to Stack, Pop an Element from Stack, Demonstrate how Stack can be used to check Palindrome, Demonstrate Overflow and Underflow situations on Stack, Display the status of Stack, Exit. Support the program with appropriate functions for each of the above operations.

Program 4

Infix to Postfix Conversion

Develop a Program in C for converting an Infix Expression to Postfix Expression. Program should support for both parenthesized and free parenthesized expressions with the operators: +, -, *, /, % (Remainder), ^ (Power) and alphanumeric operands.

Program 5

Stack Applications

Develop a Program in C for the following Stack Applications: Evaluation of Suffix expression with single digit operands and operators: +, -, *, /, %, ^. Solving Tower of Hanoi problem with n disks.

Program 6

Circular Queue Operations

Develop a menu driven Program in C for the following operations on Circular QUEUE of Characters (Array Implementation of Queue with maximum size MAX): Insert an Element on to Circular QUEUE, Delete an Element from Circular QUEUE, Demonstrate Overflow and Underflow situations on Circular QUEUE, Display the status of Circular QUEUE, Exit. Support the program with appropriate functions for each of the above operations.

Program 7

Singly Linked List

Develop a menu driven Program in C for the following operations on Singly Linked List (SLL) of Student Data with the fields: USN, Name, Programme, Sem, PhNo. Create a SLL of N Students Data by using front insertion. Display the status of SLL and count the number of nodes in it. Perform Insertion / Deletion at End of SLL. Perform Insertion / Deletion at Front of SLL(Demonstration of stack). Exit.

Program 8

Doubly Linked List

Develop a menu driven Program in C for the following operations on Doubly Linked List (DLL) of Employee Data with the fields: SSN, Name, Dept, Designation, Sal, PhNo. Create a DLL of N Employees Data by using end insertion. Display the status of DLL and count the number of nodes in it. Perform Insertion and Deletion at End of DLL. Perform Insertion and Deletion at Front of DLL. Demonstrate how this DLL can be used as Double Ended Queue. Exit.

Program 9

Polynomial Operations

Develop a Program in C for the following operations on Singly Circular Linked List (SCLL) with header nodes. Represent and Evaluate a Polynomial P(x,y,z) = 6x²y²z-4yz⁵+3x³yz+2xy⁵z-2xyz³. Find the sum of two polynomials POLY1(x,y,z) and POLY2(x,y,z) and store the result in POLYSUM(x,y,z). Support the program with appropriate functions for each of the above operations.

Program 10

Binary Search Tree

Develop a menu driven Program in C for the following operations on Binary Search Tree (BST) of Integers. Create a BST of N Integers: 6, 9, 5, 2, 8, 15, 24, 14, 7, 8, 5, 2. Traverse the BST in Inorder, Preorder and Post Order. Search the BST for a given element (KEY) and report the appropriate message. Exit.

Program 11

Graph Operations

Develop a Program in C for the following operations on Graph(G) of Cities. Create a Graph of N cities using Adjacency Matrix. Print all the nodes reachable from a given starting node in a digraph using DFS/BFS method.

Program 12

Hashing with Linear Probing

Given a File of N employee records with a set K of Keys (4-digit) which uniquely determine the records in file F. Assume that file F is maintained in memory by a Hash Table (HT) of m memory locations with L as the set of memory addresses (2-digit) of locations in HT. Let the keys in K and addresses in L are Integers. Develop a Program in C that uses Hash function H: K →L as H(K)=K mod m (remainder method), and implement hashing technique to map a given key K to the address space L. Resolve the collision (if any) using linear probing.

Additional Resources

Extra study materials to boost your lab exam preparation and understanding

Complete Lab Manual

Comprehensive lab manual with all 12 programs, detailed explanations, and step-by-step implementation guide for data structures laboratory.

All Viva Questions

Complete collection of viva questions and answers for all 12 programs to help you prepare for lab viva examinations.

Algorithm Reference

Quick reference guide for data structure algorithms including complexity analysis and implementation tips.

Practice Problems

Additional practice problems and variations to strengthen your understanding of data structures concepts.

Comments

Replay !

0 Comments

Share Your Thoughts

Please enter your name
Please enter a valid email
Password must be at least 6 characters
Please enter your comment
Email Verification Required
We've sent a 6-digit verification code to . Please enter the code below to verify your email address.
Email Verified Successfully!
Your email has been verified. Would you like to proceed with posting your comment?

Type "YES" to confirm and post your comment, or click Cancel to skip posting.

Preparing your download...