You are on page 1of 2

List of Programs for Practical Class XII

SN.
1.

Program Description
Write a C++ program to find the sum and average of one dimensional
integer array.

2.

Write a program to search for an integer with the help of binary search
method.

3.

Suppose A, B, C are arrays of integers of size M, N, and M + N


respectively. The numbers in array A appear in descending order while
the numbers in array B appear in ascending order. Write a user defined
function to produce third array C by merging arrays A and B in
ascending order.

4.

Write a menu driven program with following option


a. Accept elements of an array
b. Display elements of an array
c. Sort the array using insertion sort method
Write functions for all options. The functions should have two
parameters name of the array and number of elements in the array.

5.

Write a program to insert and delete elements in array.

6.

Write a program to input elements in a 2D array and then display the


sum of row and column wise of this array.

7.

Write a program to input two matrices, find their sum, difference,


or product depending upon users choice, and then display the
resultant matrix along with the original matrices.

8.

Define a class FLIGHT in C++ with following description:


Private Members
A data member Flight number of type integer
A data member Destination of type string
A data member Distance of type float
A data member Fuel of type float
A member function CALFUEL() to calculate the value of Fuel as per the
following criteria
Distance
Fuel
<=1000
500
more than 1000 and <=2000
1100
more than 2000
2200
Public Members
A function FEEDINFO() to allow user to enter values for Flight Number,
Destination, Distance & call function CALFUEL() to calculate the
quantity of Fuel
A function SHOWINFO() to allow user to view the content of all the
data members.

9.

Write a program to display the information of a student and calculate


his grade using the concept of inheritance.
Write a program to print and find the sum of Fibonacci series using
recursion.

10.
11.

Write a program to read file sports.dat and copy only those records
where event name is ATHLETIC.

12.

Write a menu Based application to do the following on Binary file :a. Create File & Store Information (My.txt).
b. Display the content form file.
c. Deleting a specific line form file.
d. Find and replace specified line form file.
e. Append the Content of File at the end of another

13.

Write a program to create a text file to input roll no. and marks of ten
students and display them on screen after reading from the text file.

14.

Write a program to create a binary file and write objects of class


WORKER to it and display worker details on screen after reading from
the binary file.

15.

Write a program to perform basic operations on the two complex


numbers using structures.

16.

Write a program using pointers to find the length of a string and print
the reversed string.

17.

Write a menu driven program which allows the user to perform the
following operations on a stack (Array implementation):
1) Push
2) Pop
3) Display

18.

Write a menu driven program which allows the user to perform the
following operations on a queue (Array implementation):
1) Insert
2) Delete
3) Display

19.

Write a menu driven program which allows the user to perform the
following operations on a stack (Linked implementation):
1) Push
2) Pop
3) Display

20.

Write a menu driven program which allows the user to perform the
following functions on a queue (Linked implementation):
1) Insert
2) Delete
3) Display

You might also like