0% found this document useful (0 votes)
273 views2 pages

Lab Exp DS1

This document outlines the labs for a data structures course using C programming. The labs cover topics like arrays, matrices, searching, sorting, sparse matrices, stacks, queues, linked lists, binary search trees, and different sorting algorithms. Each lab has multiple programming assignments related to the topic. Students will implement various data structures and algorithms, including matrix multiplication, merging sorted arrays, binary search, bubble sort, selection sort, insertion sort, representing sparse matrices, stack operations, queue operations, single linked lists, circular linked lists, double linked lists, binary search trees, and quicksort and mergesort.

Uploaded by

Subir Panda
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
273 views2 pages

Lab Exp DS1

This document outlines the labs for a data structures course using C programming. The labs cover topics like arrays, matrices, searching, sorting, sparse matrices, stacks, queues, linked lists, binary search trees, and different sorting algorithms. Each lab has multiple programming assignments related to the topic. Students will implement various data structures and algorithms, including matrix multiplication, merging sorted arrays, binary search, bubble sort, selection sort, insertion sort, representing sparse matrices, stack operations, queue operations, single linked lists, circular linked lists, double linked lists, binary search trees, and quicksort and mergesort.

Uploaded by

Subir Panda
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Silicon Institute of Technology

LAB COURSE HANDOUT


Sub. : BE 7108 DATA STRUCTURE USING'C Branch/Sem : All 2nd B. Tech
Department : CSE

Lab 1

(Review on C Concepts)
1. Familiar with unix vi editor.
2. Write a C program to perform matrix multiplication using 2-Darray,
3. WAP to insert an element into an array and WAP to delete an element from an array.
4. WAP to merge two sorted arrays so that the resultant array is a sorted array and multiply a
constant with each element of the merged array. Design a function for each operation.
5. WAP to create a structure called BANK with the following members
■ Ace no Name
■ Type of ace (S/C)
■ Date of opening Address Amount
And do the following operations
■ Initialize the member
■ Deposit money
■ Withdraw money after checking minimum balance
■ Update information
• Display the details of an ace holder v-ite a separate function for each operation and
implement it in menu driven program.

Lab 2: (Searching)
1. Write C program to search a Key Value in a given list of floating point values using linear
search operation.
2. Write C programs that use both recursive and non recursive functions to perform the Binary
search operation for a Key value in a given list of integers:

Lab 3: (Sorting)
L Write a C program that implement Bubble Sort method to sort a given list of integers in
descending order.
2 A/rite a C program that implement Selection Sort method to sort a given list of integers in
descending order.
3 Write a C program that implement Insertion Sort method to sort a given list of integers in
descending order.

Lab 4: (Sparse Matrix)


1, Input a sparse matrix and represent it in triplet form.
'.'.. transpose a sparse matrix by doing the following operations
Input a sparse matrix and represent it in triplet form and print Transpose the triplet form and print
it.
■ Print the original transpose matrix from the transformed sparse matrix.
3. Add two sparse matrixes, which are in triplet form.

L.ab 5: (Stack)
1, Write a C program to create a stack using an array and perform push, pop & traversal
operation.
.: WAP to reverse a string using stack
:> WAP to check the parenthesis ({,}. (,). [,]) Of a inputted string.
*■ Solve the tower of Hanoi problem-using stack.
Lab 6: (Queue)
1 Write a C program to create a queue and perform insert, delete & Traversal Operation.
I Write a C program to create a circular queue and perform insert , delete & Traversal
Operation. .

Lab 7: (Application of Stack)


1 Write a C program that uses Stack operations to perform the following:
■ Converting infix expression into postfix expression Evaluating the postfix expression

.Lab 8: (Single Linked List)


1 Write a C program that uses functions to perform the following operations on Single linked
list:
• Creation
• Insert at the beginning, end & in between Positions Delete from the beginning ,end & in
between position s
• Traversal in both ways
■ Sort all the elements present in a list Reverse the list

Lab 9: (Circular Linked List)


1 Write a C program that uses functions to perform the following operations on Circular linked
list: Creation
Insertion at any Positions Deletion at any position s Traversal

Lab 10: (Double Linked List)


. Write a C program that uses functions to perform the following operations on Double linked list:
Creation
Insertion at the beginning, ending & in between Positions Deletion at the beginning ,ending & in
between position s Traversal

Lab 11: (Binary Search Tree)


]. Write a C program that uses functions to perform the following operations on Binary Search
Tree: Creation Insertion Deletion
Traversal (In-order, Pre-order, Post-order)

Lab 12: (Sorting Mechanism)


1. Write a C orogram that implement Qu;:k Sort method to so."t a given list of integers in
ascending order:
2. Write a C program that implement Merge Sort method to sort a given list of integers in
ascending order

Test Book:- "Data structure using C" by Sudipta Mukherjee, TMH Publication
i) \ ■•' ! *)
1
i i x- *

You might also like