100% found this document useful (2 votes)
50 views6 pages

LIST OF EXPERIMENTS FOR D - S and C - P LAB

Cpp questions
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
50 views6 pages

LIST OF EXPERIMENTS FOR D - S and C - P LAB

Cpp questions
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

LIST OF EXPERIMENTS FOR DATA STRUCTURE LAB

1. Implement the Algorithm for traversing an Array of size n.


2. Implement the Algorithm for Inserting an element into an Array.
3. Implement the Algorithm for Deleting two consecutive elements from an Array.
4. Implement the Algorithm for Reversing elements of an Array.
5. Implement the Algorithm for Sequential Search.
6. Implement the Algorithm for Binary Search.
7. Implement the Algorithm for Interpolation Search.
8. Implement the Algorithm for Bubble Sort.
9. Implement the Algorithm for Selection Sort.
10. Implement the Algorithm for Insertion Sort.
11. Implement the Algorithm for Factorial using Recursion.
12. Implement the Algorithm that finds the sum of digits of a given 10 digit number
using Recursion.
13. Implement the Algorithm for Palindrome string using Recursion.
14. Implement the Algorithm that finds the Greatest Common Devisor of two
numbers using Recursion.
15. Implement the Algorithm for creating a Node and traversing a Linked List.
16. Implement the Algorithm for Inserting a Node at the beginning of a Linked List.
17. Implement the Algorithm for Inserting a Node at the Given Location of a Linked
List.
18. Implement the Algorithm for Inserting a Node at the End of a Linked List.
19. Implement the Algorithm to create and display a Circular Linked List.
20. Implement the Algorithm to Delete a Node of a Circular Linked List whose data
field is Given.
21. Implement the Algorithm to Delete first Node of a Circular Linked List.
22. Implement the Algorithm to Insert a new Node in a Circular Linked List after a
Node whose data field is Given.
23. Implement the Algorithm for creating and traversing a Doubly Linked List.
24. Implement the Algorithm for Inserting a Node at the beginning of a Doubly
Linked List.
25. Implement the Algorithm for Inserting a Node by data field of a Doubly Linked
List.
26. Implement the Algorithm for Operations to be performed on Stack DS using
Array.
27. Implement the Algorithm for Operations to be performed on Stack DS using
Linked List.
28. Implement the Algorithm for Operations to be performed on Queue DS using
Array.
29. Implement the Algorithm for Operations to be performed on Queue DS using
Linked List.
30. Implement the Algorithm for Circular Queue DS using Array.
31. Implement the Algorithm for Circular Queue DS using Liked List.
32. Implement the Algorithm for Priority Queue.
33. Implement the Algorithm for DEQUE( head- tail queue)[Menu driven Program].
34. Implement the Algorithm for Post Order Traversal of a BST.
35. Implement the Algorithm for Pre Order Traversal of a BST.
36. Implement the Algorithm for In Order Traversal of a BST.
37. Implement the Algorithm for Level Order Traversal of a BST.
38.
39. Implement the Algorithm for Inserting a Node in a BST using Linked List.
40. Implement the Algorithm to find height of a BST.
41. Implement the Algorithm to find total number of Nodes of a BST.
42. Implement the Algorithm to find smallest Node of a BST.
43. Implement the Algorithm to find greatest Node of a BST.
44. Implement the Algorithm to delete Node of a BST.
45. Implement the Algorithm for Adjacency Matrix Representation of a Graph.
46. Implement the Algorithm for Adjacency List Representation of a Graph.
47. Implement the Algorithm for Depth First Search Traversal of a Graph[starting
from a random Node].
48. Implement the Algorithm for Breadth First Search Traversal of a Graph[starting
from a random Node].
49. Implement the Algorithm for: Consider the graph G given. Suppose we want to
print all the nodes that can be reached from the node H (including H itself).

50. Consider the graph G as shown in the above fig.. The adjacency list of G is
also given. Assume that G represents the daily flights between different cities and
we want to fly from city A to I with minimum stops. That is, find the minimum
path P from A to I given that every edge has a length of 1.
LIST OF EXPERIMENTS FOR COMPUTER PROGRAMING LAB
1. Write a program in C++ that inputs a three-digit number and outputs the sum of the digits.
2. Write a program in C++ to display whether an input year is Leap Year.
3. Write a program in C++ to swap values of two variables without using third variables.
4. Write a program in C++ to find the divisors of a natural number.
5. Write a C++ Program to Check Whether a Number is Palindrome or Not
6. Write a C++ Program to Convert Number in Characters
7. Write a C++ Program to convert decimal to binary.
8. Write a C++ program to print number triangle.
9. Write a C++ Program to print Alphabet triangle.
10.Write a C++ Program to Display Fibonacci Series
11.Write a C++ Program to Calculate Factorial Using Recursion
12.Write a program in C++ using Class that adds three numbers and displays total. (class Adder
program)
13. Write a C++ program to find the area of circle using class circle which have following details:
a. Accept radius from the user b. Calculate the area c. Display the result
14.Write a C++ program to define a class employee having members Emp-id, Emp-name, basic
salary and functions accept() and display(). Calculate DA=25% of basic salary, HRA=800, I-
tax=15% of basic salary. Display the payslip using appropriate output format.
15.Write a program in C++ using Class for Calculator.
16.C++ program to read time in seconds and convert in time format (HH:MM :SS) using class
17.Write a program in C++ using class to show constructor overloading.
18.Define a class to represent a bank account. Include the following members:
Data members: Member functions:
1) Name of the depositor 1) To assign initial values
2) Account number 2) To deposit an amount
3) Type of account 3) To withdraw an amount after checking the balance
4) Balance amount in the account. 4) To display name and balance.
Write a main program to test the program.
19.Write a program in C++ using Class that takes input the height, length, breadth of a Box and
displays Volume of two different Box. (Class Box)
20.Write a program in C++ using Class that displays a Menu to add, remove, display, display
Total for items and displays the Bill on output.
(Class Product).
21.Write a program in C++ using Class which shows function Overriding.
22.Write a C++ Program using class to demonstrate function overloading.
23.Write a program in C++ using class to show use of Friend function.
24.Write a program in C++ using class to show use of Friend Class.
25.Create a class staff having fields: Staff_id , name, salary. Write a menu driven program
for:(OPERATOR OVERLOADING)
1) To accept the data
2) To display the data
3) To sort the data by name
26. Create a class for an electricity board that charges the following rates to users
a) For first 100 units : 40p per unit
b) For next 200 units : 50p per unit
c) Beyond 300 units : 60p per unit
All users are charged a minimum of Rs.500. If the total cost is more than Rs.250.00 then an
additional charges of 15% are added.
Write a C++ program using class to read the names of users & number of units consumed &
print out the charges with names.
27. Write a C++ program to create multilevel inheritance. (Hint: Classes A1, A2, A3).
28. Extend the time class program in 12 that uses the overloaded + operator to add two
times.
29. Assume that a Bank maintains two kinds of account for their customers, one called as
Saving Acc and another as Current Acc. The Saving Acc Provides compound interest and
withdrawal facilities but no check book facility. The Current Acc provides check book facilities
but no interest, also Current acc. Holders must maintain a minimum balance and if the balance
falls below this level a service charge is imposed. Create a Class Account that stores customers’
name, Acc No, and Acc Type. From this class derive the Classes Curr_Acc and Saving_Acc
and include necessary member functions to achieve the following Tasks:
1)Accept deposit form a customer and update the balance.
2) display the Balance
3) Compute Interest and deposit interest.
4)permit withdrawal and update the balance.
5)Check the min. balance, impose penalty and update the balance.

30. An Educational institution wishes to maintain the database of its employees. The database is
divided into a number of Classes whose hierarchical relation is shown, also minimum
information needed for each class is shown. Specify all classes and define functions to create
the database and retrieve the individual information.

You might also like