Program 1
Program 1
A class teacher has created a text file "RV.txt" to store the details of all the
students. Write a menu driven program to perform the different tasks as
specified:
(i) To display the details of each and every student as specified in the file
"RV.txt"
(ii) To display the record getting the highest total.
Use the concept of file operations to deal with the above problem.
PROGRAM 2
Insertion sort is a simple sorting algorithm that builds the final sorted
array (or list) one item at a time. Insertion sort iterates, consuming one input
element each repetition, and growing a sorted output list. At each iteration,
insertion sort removes one element from the input data, finds the location it
belongs within the sorted list, and inserts it there. It repeats until no input
elements remain.
M(N) = 1 if N = 1 [Condition 1]
Queue is an abstract data structure which is open at both its ends. One end is
always used to insert data and the other is used to
remove data. Queue follows First-In-First-Out methodology, i.e.,
the data item stored first will be accessed first.
PROGRAM 6
Write a program to implement the following class that adds words to a Quote
using a linked list.
Member methods:
To do so, define another class Card(defined inside Quote) that holds one word
of the quote and a link to the next word. Use this code snippet: