Professional Documents
Culture Documents
A class teacher has kept the records of the marks obtained in Eng1 and
Eng2 of all the students in two different files "ENG1.DAT" and
"ENG2.DAT" along with their names . Write a program to merge both
the files in a single file "ENG.DAT" to keep the record of all the
students with the name , marks obtained in Eng1, Eng2 and the
average marks obtained in Eng1 and Eng2 as per the given format
abc 78 70 74
def 64 72 68
….. … …. …….
Q2)
(a) A candidate must score at least 40% marks in each subject to qualify
otherwise disqualified
(b) Different streams will be allotted on the basis of total score of all
the subjects as follows
Total Score Stream Allotted
>=280 CS
Read the above created binary file . Find qualified and disqualified
candidates(using the criterion given above ) and then calculate the total
score of each candidate and allot the stream using the codes :CS,EC or
ME using the criteria given above . To make the process little more
simplified the records of successful candidates of different streams
along with the stream codes are stored into other binary files
"comp.dat", "electro.dat" and "mech.dat". The list of waiting
candidates are put in the file "waitlist.dat".
Q3)
Q4)
Q5)
Write a program using binary file concept for the following operations
Create a binary file "info.dat" to store name , pan number , and total
taxable income for various persons till the user wants to store .
Read the binary file "info.dat" to print all the records after updating
the file .
Q6)