06CSL37 DATA STRUCTURES LABORATORY syllabus for CS


Unit-1 0 hours

Write a C Program to create a sequential file with atleast 5 records, each record having the structure shown below: Write necessary functions a. To display all the records in the file. b. To search for a specific record based on the USN. In case the record is not found, suitable message should be displayed. Both the options in this case must be demonstrated.

Unit-2 0 hours

Write and demonstrate the following C functions: a. newStrCpy that does the same job as strcpy b. newStrCat that does the same job as strcat without using any library functions.

Unit-3 0 hours

Write a C Program, which accepts the Internet Protocol (IP) address in decimal dot format (ex. 153.18.8.105) and converts it into 32-bit long integer (ex. 2568095849) using strtok library function and unions.

Unit-4 0 hours

Write a C Program to construct a stack of integers and to perform the following operations on it: a. Push b. Pop c. Display The program should print appropriate messages for stack overflow, stack underflow, and stack empty.

Unit-5 0 hours

Write a C Program to convert and print a given valid parenthesized infix arithmetic expression to postfix expression. The expression consists of single character operands and the binary operators + (plus), - (minus), * (multiply) and / (divide).

Unit-6 0 hours

Write a C Program to evaluate a valid suffix/postfix expression using stack. Assume that the suffix/postfix expression is read as a single line consisting of non-negative single digit operands and binary arithmetic operators. The arithmetic operators are + (add), - (subtract), * (multiply) and / (divide).

Unit-7 0 hours

Write a C Program to simulate the working of a queue of integers using an array. Provide the following operations: a. Insert b. Delete c. Display

Unit-8 0 hours

Write a C Program to simulate the working of a circular queue of integers using an array. Provide the following operations: a. Insert b. Delete c. Display

Unit-9 0 hours

Write a C Program using dynamic variables and pointers, to construct a singly linked list consisting of the following information in each node: student id (integer), student name (character string) and semester (integer). The operations to be supported are: a. The insertion operation i. At the front of a list ii. At the back of the list iii. At any position in the list b. Deleting a node based on student id. If the specified node is not present in the list an error message should be displayed. Both the options should be demonstrated. c. Searching a node based on student id and update the information content. If the specified node is not present in the list an error message should be displayed. Both situations should be displayed. d. Displaying all the nodes in the list. (Note: Only one set of operations among a, b and c with d may be asked in the examination)

Unit-10 0 hours

Write a C Program using dynamic variables and pointers to construct a stack of integers using singly linked list and to perform the following operations: a. Push b. Pop c. Display The program should print appropriate messages for stack overflow and stack empty.

Unit-11 0 hours

Write a C program using dynamic variables and pointers to construct a queue of integers using singly linked list and to perform the following operations: a. Insert b. Delete c. Display The program should print appropriate messages for queue full and queue empty.

Unit-12 0 hours

Write a C Program to support the following operations on a doubly linked list where each node consists of integers: a. Create a doubly linked list by adding each node at the front. b. Insert a new node to the left of the node whose key value is read as an input c. Delete the node of a given data, if it is found, otherwise display appropriate message. d. Display the contents of the list. (Note: Only either (a,b and d) or (a, c and d) may be asked in the examination)

Unit-13 0 hours

Write a C Program a. To construct a binary search tree of integers. b. To traverse the tree using all the methods i.e., inorder, preorder and postorder. c. To display the elements in the tree.

Unit-14 0 hours

Write recursive C Programs for a. Searching an element on a given list of integers using the Binary Search method. b. Solving the Towers of Hanoi problem.

Last Updated: Tuesday, January 24, 2023