0% found this document useful (0 votes)
5 views

Data structures important questions

The document outlines a series of programming tasks involving linked lists, queues, and stacks in C language. It includes specifications for creating menu-driven programs for managing data related to flat owners, employees, students, and hotel visitors, with functionalities such as adding, searching, modifying, and deleting records. Each task emphasizes proper memory handling, avoiding duplicates, and ensuring efficient code implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Data structures important questions

The document outlines a series of programming tasks involving linked lists, queues, and stacks in C language. It includes specifications for creating menu-driven programs for managing data related to flat owners, employees, students, and hotel visitors, with functionalities such as adding, searching, modifying, and deleting records. Each task emphasizes proper memory handling, avoiding duplicates, and ensuring efficient code implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Implement proper memory handling in the code.

Q.1. Write a Menu-driven Linked List Program in C language to store Flat Owner
information's with mentioned below functionalities.

● A Linked list node contains following fields for Flat owner


○ Owner_name,
○ building_name (eg ABCD)
○ flat_number (a four digit number: eg 1101, 0203, whereas first 2 digits
indicates floor number)
○ society_name
○ pin_code (a six digit mumber) 05 marks
● Function-User can Add. Display, Search and Delete Flat owner info Search and
Delete flat owner by flat_number 20 marks
● Design Men Driven Program (Using Switch-cases) 10 marks
● Write appropriate comments 05 marks

****************************************************************************************************

Q2: Implement a menu-driven employee database using sorted doubly linked list with
following functionality: 25 Marks

● Following data should be taken as input from the user (Take the datatypes
carefully and efficiently)
○ Employee Name
○ Employee ID (Unique ID of 4 digit)
○ Gender
○ Designation (Post)
● Implement add, search, modify, show all, delete and exit a given Employee ID's
data from the list.
● Implement an add_node(...) function along with other functions, which should
take the input from user and store the node in sorted manner in the list based on
Employee ID.
● Make sure there should be no duplicate Employee ID entry in the list.
● Implement a counter on the menu page to show how many of employees are
currently employed in the organization.
● In exit function, implement the functionality to delete complete database and
deallocate all the memory.
● Code implementation should be neat and logic should be clear, time and space
complexity are to be taken into consideration as well.

****************************************************************************************************

Q3: Write a program to implement a queue for management of crowd at a movie


counter which has a capacity of 8 customer at a time. Implement add in queue()
function for enqueue operation. If the number of customers are more than 8 then a
warning of "Limit exceeded" should be displayed. 15 Marks

● Write a function remove customer() to remove the customer from the front end of
the queue when he/she gets the ticket (dequeue() functionality).
● Write a function for counter closed() with the functionality that no customer
should be present at the counter (Exit( ) functionality).

****************************************************************************************************

Q4: Implement a menu-driven school portal using sorted doubly linked list with following
functionality: 25 Marks

● Following data should be taken as input from the user


○ Name
○ Age
○ Roll number (should be unique)
○ Address
● Implement add, search, modify, show all, delete and exit a given student data
from the list.
● Implement an add_node(...) function along with other functions, which should
take the input from user and store the node in sorted manner in the list based on
roll numbers
● Make sure there should be no duplicate roll number entry in the list.
● Implement a counter on the menu page to show how many of students are
currently present in the list.
● Code implementation should be neat and logic should be clear, time and space
complexity are to be taken into consideration as well.

****************************************************************************************************

Q5: Using singly linked list, implement a stack of max depth of 10, implement push, pop
and delete stack functions for the same. 15 Marks
****************************************************************************************************

Q6: Implement a hotel portal with menu-driven singly linked list with the following
options to the user: 25 Marks

● Following data should be taken as input from the user


○ Name
○ Id Number
○ Date of check-in (in DD:MM:YYYY)
○ Time of check-in (24-hour format)
● Implement add_visitor, search, show_all, delete and exit a given visitor data from
the list.
● Implement an add_visitor(...) function along with other functions, which should
take the input from user and store the node in sorted manner in the list based on
time of their checking-in.
● Make sure there should be no duplicate ID number entry in the list.
● Implement a counter on the menu page to show how many of visitors are
currently present in the list.
● Code implementation should be neat and logic should be clear, time and space
complexity are to be taken into consideration as well.

****************************************************************************************************

Q7: Using singly linked list, implement a queue of max depth of 10, implement enqueue,
dequeue and delete queue functions for the same. 15 Marks

You might also like