Xii Cs Worksheet-binary File
Xii Cs Worksheet-binary File
You, as a programmer assigned to develop POS software for this store, have been asked to do this job for
Mr. Darvy.
(I) Write a function to input the data of a product and append it in a binary file named ‘INVENTORY.DAT’.
(II) Write a function to update the data of those products whose Brand is ‘Nestle’ and reduce their price by
5%.
(III) Write a function to read the data from the binary file and display the data of all those products which
are produced by ‘Nirvana’ (brand).
Rahman is a manager working in a recruitment agency. He needs to manage the records of various
candidates. For this, he wants the following information of each candidate to be stored: -
Candidate_ID – integer
Candidate_Name – string
Designation – string
Experience – float
You, as a programmer of the company, have been assigned to do this job for Rahman.
(i) Write a function to input the data of a candidate and append it in a binary file.
(ii) Write a function to update the data of candidates whose experience is more than 10
years and change their designation to "Senior Manager".
(iii) Write a function to read the data from the binary file and display the data of all those
candidates who are not "Senior Manager".
Shivam Sen is a programmer in school , He needs to manage the records of various students. For this he wants
the following information of each student to be stored:
i. Mention any two difference between binary and csv files ?
ii. AddStudents() is a function to input the data of a students and append it in the file STUDENT.DAT containing
student information – roll number, name and marks (out of 100) of each student.
iii.GetStudents() is a function Write a function to read the data from the file to display the name and
percentage of those students who have a percentage greater than 75. In case there is no student having
percentage > 75, the function displays an appropriate message