A binary file named “EMP.dat” has some records of the structure
[EmpNo, EName, Post, Salary]
(a) Write a user-defined function named NewEmp() to input the details of a
new employee from the user and store it in EMP.dat.
(b) Write a user-defined function named SumSalary(Post) that will accept an
argument the post of employees & read the contents of EMP.dat and
calculate the SUM of salary of all employees of that Post.
Answers
Answered by
3
SUM of salary of all employees of that Post.
Explanation:
binary file named “EMP.dat” has some records of the structure
[EmpNo, EName, Post, Salary]
(a) Write a user-defined function named NewEmp() to input the details of a
new employee from the user and store it in EMP.dat.
(b) Write a user-defined function named SumSalary(Post) that will accept an
argument the post of employees & read the contents of EMP.dat and
- calculate the SUM of salary of all employees of that Post
Answered by
4
Explanation:
Hope it helps! ✌️✌️
Mark me brainliest
Attachments:
![](https://hi-static.z-dn.net/files/df7/2d9f018df11967a006a756478900d3d1.jpg)
Similar questions