A formatted file master.txt contains the employee code, name and basic pay of employees of an organization. Write a program to calculate the D.A(dearness allowance), H.R.A (House rent allowance) and gross income of each employee and store employee code, name, basic pay, D.A,H.R.A and gross income to the file emp.txt, where D.A is the 32% of basic pay, H.R.A is 15% of basic pay and gross pay is the sum of basic pay, D.A and H.R.A. Note: Use C language.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.4: File Streams As Function Arguments
Problem 3E
icon
Related questions
Question

A formatted file master.txt contains the employee code, name and basic pay of employees of an organization. Write a program to calculate the D.A(dearness allowance), H.R.A (House rent allowance) and gross income of each employee and store employee code, name, basic pay, D.A,H.R.A and gross income to the file emp.txt, where D.A is the 32% of basic pay, H.R.A is 15% of basic pay and gross pay is the sum of basic pay, D.A and H.R.A.

Note: Use C language.

Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr