Question based binary file handling cs
Question based binary file handling cs
Q1. You are programmer in a software company,Your work profile is to manage the
records of various employees. For this you want following information of each employee
to be stored-
Employee_id – integer
Employee_Name – string
Emoployee_job – string
Employee_sal – float
Q2 Manoj is working in a sports college. He needs to manage the records of the teams
in each Sport. For this, he wants the following information of the students to be stored in
the binary file SPORT.DAT-
SportName
TeamName
No_Players
You, as a programmer of the company, have been assigned to do this job for the
college.
Q3. Ajay has written a code and created a binary file product.dat with pid, name, brand
and cost. The file contains 10 records. Help him to do the following task –
a. Write a function to input data of product and append in the binary file.
b. Write a function to update the data of product whose cost is more than 200 and
change their brand as “sony”.
c. Write a function to read all the data from binary file and display those products whose
brand is not “LG”.