Vous êtes sur la page 1sur 5

Practical List XII B

1. Write a menu driven program to perform following operation on string without using
built-in functions.
- Find the length of the string
- Compare two string
- Concatenate two strings.
- Check whether the entered string is palindrome or not

2. Define a structure Document with the following data members:


- Document name of type character array of length 30
- Topic of type character array with length as 30
- No of pages of type integer

Write a program to declare an array of type Document with N number of elements. Write
separate functions for the following
a) To enter the values in array
b) To search for a document name and display its details.
c) To sort and display the complete array in ascending order of No of pages.
- .
3. Write a menu driven program to create a two dimensional array of M X N. And
perform the following operations:
- Find the sum of each row separately
- Find the sum of each column separately
- Find the sum of each diagonal
- Print the upper half and lower half
Example :
Upper half Lower half
1 2 3 1 2 3 3
4 5 6 4 5 5 6
7 8 9 7 7 8 9

4. Write a menu driven program:


- to read an integer array
- sort it using bubble sort
- search an element using the binary search.

1
5. Declare a class to represent bank account of N customers with the
following data members. Name of the depositor, Account number, Type of
account (S for Savings and C for Current), Balance amount. The class also
contains member functions to do the following :
(i) to read data members
(ii) to deposit money
(iii) to withdraw money after checking the balance (minimum balance is
Rs. 1000)
(iv) to display the data members
Write a menu driven program to do following task:
a. create account for N customers
b. deposit money in given account no
c. withdraw money from given account no
d. print the tabular report of all accounts

6. Create a class library containing the following for the books in the library :
Data Members : (private Members)
(a) Access number
(b) Name of the author
(c) Title of the book
(d) Publisher’s name
(e) Price of the book
(f) Number of copies
Member Functions :
(a) To add any new book to the list of books in the library.
(b) To modify the price of a given book.
(c) To display names of the books, author’s name and the price of all the books in tabular
form.
Write a menu driven program to enter the information of N books,modify the price of given
book and display tabular report.

7. Declare a class containing


- Eno, Name, Salary
- And required functions ( Add according to the requirement)
Write a menu driven program
- To create an array of N employees
- To display the record in ascending order of salary
- To display the record of employee with given employee name

2
8. A class student has three data members and few member functions
- Name
- Rollno
- Marks
Write a menu driven program
- to create a file
- to print the stream according to the total marks of the student
o 96 or more computer sc.
o 91-95 Electronics
o 86-90 Mechanical
o 81-85 Electrical
o 76-80 Chemical
o 71-75 Civil

9. Write a menu driven program to


- create a text file
- Display all the line starting with Vowels.
- Count the word ‘the’ in the text file.

10. Write a menu driven program


- to create a text file
- count number of vowels, digits and words
- Create another file using the original which will contain
the text after replacing all the blank spaces with #.

11. Write a program to modify the record using seekg(), seekp(), tellg() and
tellp().

12. Declare a class containing


- Name
- Address
- Telephone no
Write a menu driven program to
- append record in a file
- display the name and address for a given telephone
number

13. A blood bank maintains the record of donor: name,


address, blood group. Write a menu driven program
- create file of donor
- print the name of all the donors having given blood group
- print the tabular list of donors.

3
14. Declare a class containing
- Bno
- Bname
- Price
- And required functions
Write a menu driven program
- to add record in a file
- to modify the price of the given Bno

15. Declare a class Sports having


- sno
- sname
- fees
- required functions
Write a menu driven program
- to append record in a file
- delete the record of given sno
16. Write a menu driven program to find number of alphabets, words, line
in a given string using pointers.

17. Each node of QUEUE contain


- Eno, Salary, Pointer field
Front is the first node of QUEUE and REAR is the last
node. Write a menu driven program
- To add element in the queue
- To delete element from the queue

18.Each node of STACK contain


- Rollno
- Age
- Pointer field
TOP is the first node of STACK. Write a menu driven
program
- To push
- To pop

19. Declare a linear stack containing integer. Write a menu


driven program to push and pop elements.

20.Declare a linear circular queue of integer. Write a menu


driven program to add and delete elements from the queue.

4
5

Vous aimerez peut-être aussi