Académique Documents
Professionnel Documents
Culture Documents
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
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
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.
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
11. Write a program to modify the record using seekg(), seekp(), tellg() and
tellp().
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
4
5