Escolar Documentos
Profissional Documentos
Cultura Documentos
Note :
1. All programs should be done using Class concept
( Data members and member functions)
2. Method of Sorting will be specified during the
practical exam.
3. Mark Distribution
Sql 5
Program 1 10
Program 2 10
Viva (C++& Project) 5
----
30
----
C++ Program List
1. Write a C++ program to sort the array of names using selection sort.
2. Write a C++ program to sort the array of names using Bubble sort.
3. Write a C++ program to sort the array of names using Insertion sort.
4. Write a C++ program to insert a data item into an array of integers when the position and
the data item to be inserted is given by the user.
5. Write a C++ program to insert a data item into a sorted array of integers according to the
position. Data item to be inserted is given by the user(Sort the array using any sort)
6. Write a C++ program to delete a data item in a array of characters.
7. Write a menu based C++ program to find a data item in a array of characters using linear
search. (In the sorted array and Unsorted array of characters)Sort the array using any sort
8. Write a menu based C++ program to find a data item in a array of 10 Strings using Binary
search. (Sort the array using any sort)
9. Write a C++ program to merge the contents of 2 unsorted integers arrays of size 7 and 10
into a single sorted array. Sort the array using any sort. ( All combinations )
10. Write a C++ program to merge the contents of 2 unsorted integer arrays of size 7 and 10
into a single sorted array without duplication. Sort the array using any sort. (All
Combinations)
11. Write a C++ program to find the sum, difference and product of 2 matrices of size M x N
12. Write a C++ program to find the sum, difference, product and quotient of 2 complex
numbers.
13. Write a C++ program to get the name and marks of 3 subjects of 5 students. Find the row
total, row average. Display the list in descending order of Row total .
14. Write a C++ program to create a Text file "TEXT.CPP" and find the total number of
characters, words, lines and blank spaces in the file. Display the file contents.
15. Write a C++ program to create a Text file "TEXT.CPP" and invert the case of the text file
and store it in "DOC.DOC" . Also find the number of lines that starts with an Uppercase
character. Display both the files. Also find the total number of lines that starts with
uppercase alphabet.
16. Write a C++ program to create a Text file "TEXT.CPP" and invert the case of the text file
and store it in "DOC.DOC" . Also find the number of lines that starts with an Uppercase
character. Display both the files.
17. Write a C++ program to create a Text file "TEXT.CPP" and search the word “the” in the
file and replace it with “***” and store it in "DOC.DOC" . Also find the number of words
that starts with an Uppercase character and the second last character is ‘e’. Display both
the files.
18. Write a C++ program to create a Text file "TEXT.CPP" and Display the alternate words in
the given file. Also display the Palindromic words of the file.
19. Write a C++ program to create 2 Text files "TEXT1.DOC" and "TEXT2.DOC" and merge
the contents of the files into TEXT3.DOC. Display all three files
20. Write a menu based C++ program to Create, Display and count the number of records in
the binary file with the given fields.
Fields : Item_code Long
Item_description 20 characters
Cost double
21. Write a menu based C++ program to create, Display, insert in a Binary file of records with
the given fields.
Fields : Emp_code Long
Emp_Name 20 characters
Salary double
22. Write a menu based C++ program to create, Display and Delete a binary file of records
with the given fields.(Use Class )
Fields : St_id Long
St_name 20 characters
Fees integer
23. Write a menu based C++ program to create, Display, search and modify a Binary file of
records with the given fields.(using Temporary file)
Fields : Item_code Long
Item_description 20 characters
Cost double
24. Write a menu based C++ program to create, Display, search and modify a Binary file of
records with the given fields. (using Seekg /seekp / tellp / tellg)
Fields : Item_code Long
Item_description 20 characters
Cost double
25. Write a menu based C++ program to create, Display and Sort a Binary file of records with
the given fields.
Fields : Rollno Integer
Name 20 characters
age Integer
26. Write a menu based C++ program to create, Display, insert in a sorted Binary file of
records with the given fields.
Fields : Emp_code Long
Emp_Name 20 characters
Salary double
27. Write a Menu based C++ program to Push, display and Pop a node into a stack in the
form of linkedlist .
Fields : Item_code Long
Item_description 20 characters
Cost float
28. Write a Menu based C++ program to Push, display and Pop a node into a stack in the
static array .
Fields : : Rollno Integer
Name 20 character
age Integer
29. Write a Menu based C++ program to Add,display and Delete a node into a Queue in the
form of linked list.
Fields : Rollno Integer
Name 20 characters
age Integer
30. Write a Menu based C++ program to Add,display and Delete a node into Queue in the
static array.
Fields : Item_code Long
Item_description 20 characters
Cost float
31. Write a Menu based C++ program to Add , Delete and display a node into a circular queue
in the form of arrays. (Integer array)
32. Define a Base class with Name, code and age This has two derived classes Student and
Employee Student consists of Marks in 3 subjects, total and average. Employee consists
of Salary and designation. Allrounder is a derived class of student and datamembers are
sports name and points obtained by the student in that game. Write a C++ program to
input and display the details of the above structure.
33. Write a C++ program to create a array of integers and push the negative numbers to the
begining of the array and the positive numbers to the end of the array in the same order
Given array : 4, -5, 8, 90, -34, 33, 3, -9, 0
Resultant array : -5, -34, -9, 0, 4, 8, 90, 33, 3
34. Create a double dimentional array of size N x N and find the following. ( N is constant 10)
Sum of Diagonals
Sum of Each Row
Sum of Each colomn.
If (N is Odd) find Sum of Middle row and middle column
Display the Upper and Lower triangle
Display the Outer boundary of the 2D array
35. Create a single dimensional array of Size N(EVEN) and do the following (Display all 4 arrays )
Tranfer to a 2D array of size N x N in the following format
o Given array ( 8, 2, 3 , 4 , 7 )
o 2D array 8 0 0 0 0
8 2 0 0 0
8 2 3 0 0
8 2 3 4 0
8 2 3 4 7
Tranfer to a 2D array of size N x N in the following format
o Given array ( 8, 2, 3 , 4 , 7 )
o 2D array 0 0 0 0 8
0 0 0 2 8
0 0 3 2 8
0 4 3 2 8
7 4 3 2 8